[v6.1] WARNING in tcp_recvmsg_locked

0 views
Skip to first unread message

syzbot

unread,
Apr 4, 2024, 3:11:27 AMApr 4
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 347385861c50 Linux 6.1.84
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17d7ae03180000
kernel config: https://syzkaller.appspot.com/x/.config?x=c6572e59ce99583c
dashboard link: https://syzkaller.appspot.com/bug?extid=f8668bc77ab1a2527c3f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15e64a3d180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ddd93d180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/101d17869fc3/disk-34738586.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1fd47dc155f3/vmlinux-34738586.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3a82e916ef21/Image-34738586.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f8668b...@syzkaller.appspotmail.com

------------[ cut here ]------------
TCP recvmsg seq # bug 2: copied 98ABF81A, seq 98ABF7E2, rcvnxt 98ABF7E3, fl 40
WARNING: CPU: 0 PID: 4874 at net/ipv4/tcp.c:2530 tcp_recvmsg_locked+0x5a0/0x1ce4 net/ipv4/tcp.c:2528
Modules linked in:
CPU: 0 PID: 4874 Comm: syz-executor265 Not tainted 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : tcp_recvmsg_locked+0x5a0/0x1ce4 net/ipv4/tcp.c:2528
lr : tcp_recvmsg_locked+0x5a0/0x1ce4 net/ipv4/tcp.c:2528
sp : ffff80001e867220
x29: ffff80001e8673e0 x28: ffff0000c37420dc x27: ffff0000c3741a38
x26: ffff0000cf75f270 x25: ffff0000c3741a38 x24: 1fffe00019eebe53
x23: 0000000000000001 x22: 0000000098abf7e2 x21: 1fffe00019eebe54
x20: 0000000098abf81a x19: dfff800000000000 x18: 1fffe0003686b776
x17: ffff80001583d000 x16: ffff800008305ec4 x15: ffff0001b435bbbc
x14: 1ffff00002b080b0 x13: dfff800000000000 x12: 0000000000000003
x11: 0000000000ff0100 x10: 0000000000000003 x9 : 472be0453f6b0400
x8 : 472be0453f6b0400 x7 : ffff80000827c8d4 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000006 x1 : ffff8000122ac6e0 x0 : ffff80019ebc9000
Call trace:
tcp_recvmsg_locked+0x5a0/0x1ce4 net/ipv4/tcp.c:2528
receive_fallback_to_copy net/ipv4/tcp.c:2025 [inline]
tcp_zerocopy_receive+0x6a8/0x1ce8 net/ipv4/tcp.c:2232
do_tcp_getsockopt+0x1b44/0x28d0 net/ipv4/tcp.c:4375
tcp_getsockopt+0x6c/0xe8 net/ipv4/tcp.c:4445
sock_common_getsockopt+0xa8/0xc4 net/core/sock.c:3651
__sys_getsockopt+0x1e8/0x484 net/socket.c:2327
__do_sys_getsockopt net/socket.c:2342 [inline]
__se_sys_getsockopt net/socket.c:2339 [inline]
__arm64_sys_getsockopt+0xb8/0xd4 net/socket.c:2339
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
irq event stamp: 1362
hardirqs last enabled at (1361): [<ffff80000827c974>] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline]
hardirqs last enabled at (1361): [<ffff80000827c974>] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004
hardirqs last disabled at (1362): [<ffff800012151e8c>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (1354): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (1354): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (1323): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
cleanup rbuf bug: copied 98ABF81A seq 98ABF7E3 rcvnxt 98ABF7E3
WARNING: CPU: 1 PID: 4874 at net/ipv4/tcp.c:1649 tcp_cleanup_rbuf net/ipv4/tcp.c:1647 [inline]
WARNING: CPU: 1 PID: 4874 at net/ipv4/tcp.c:1649 tcp_recvmsg_locked+0x19bc/0x1ce4 net/ipv4/tcp.c:2670
Modules linked in:
CPU: 1 PID: 4874 Comm: syz-executor265 Tainted: G W 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : tcp_cleanup_rbuf net/ipv4/tcp.c:1647 [inline]
pc : tcp_recvmsg_locked+0x19bc/0x1ce4 net/ipv4/tcp.c:2670
lr : tcp_cleanup_rbuf net/ipv4/tcp.c:1647 [inline]
lr : tcp_recvmsg_locked+0x19bc/0x1ce4 net/ipv4/tcp.c:2670
sp : ffff80001e867220
x29: ffff80001e8673e0 x28: ffff700003d0ce6c x27: ffff0000c3741a38
x26: ffff0000c3741880 x25: ffffffffffffffc9 x24: 0000000000000000
x23: 0000000000000001 x22: 0000000000000037 x21: 0000000098abf7e3
x20: 0000000098abf81a x19: dfff800000000000 x18: 0000000000000000
x17: 0000000000000000 x16: ffff800008305ec4 x15: 0000000000000000
x14: 1ffff00002b080b0 x13: dfff800000000000 x12: 0000000000000001
x11: 1fffe0001b213910 x10: 0000000000000000 x9 : 472be0453f6b0400
x8 : 472be0453f6b0400 x7 : ffff80000827c8d4 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffff80000826a620
x2 : 0000000000000001 x1 : 0000000000000004 x0 : 0000000000000001
Call trace:
tcp_cleanup_rbuf net/ipv4/tcp.c:1647 [inline]
tcp_recvmsg_locked+0x19bc/0x1ce4 net/ipv4/tcp.c:2670
receive_fallback_to_copy net/ipv4/tcp.c:2025 [inline]
tcp_zerocopy_receive+0x6a8/0x1ce8 net/ipv4/tcp.c:2232
do_tcp_getsockopt+0x1b44/0x28d0 net/ipv4/tcp.c:4375
tcp_getsockopt+0x6c/0xe8 net/ipv4/tcp.c:4445
sock_common_getsockopt+0xa8/0xc4 net/core/sock.c:3651
__sys_getsockopt+0x1e8/0x484 net/socket.c:2327
__do_sys_getsockopt net/socket.c:2342 [inline]
__se_sys_getsockopt net/socket.c:2339 [inline]
__arm64_sys_getsockopt+0xb8/0xd4 net/socket.c:2339
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
irq event stamp: 1630
hardirqs last enabled at (1629): [<ffff80000827c974>] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline]
hardirqs last enabled at (1629): [<ffff80000827c974>] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004
hardirqs last disabled at (1630): [<ffff800012151e8c>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (1600): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (1600): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (1365): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages