------------[ 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): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline] hardirqs last enabled at (1361): [] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004 hardirqs last disabled at (1362): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405 softirqs last enabled at (1354): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (1354): [] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600 softirqs last disabled at (1323): [] ____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): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline] hardirqs last enabled at (1629): [] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004 hardirqs last disabled at (1630): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405 softirqs last enabled at (1600): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (1600): [] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600 softirqs last disabled at (1365): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 ---[ end trace 0000000000000000 ]---