================================================================== BUG: KASAN: slab-use-after-free in tcp_can_ingest net/ipv4/tcp_input.c:4896 [inline] BUG: KASAN: slab-use-after-free in tcp_prune_ofo_queue+0x37e/0x6e0 net/ipv4/tcp_input.c:5520 Read of size 4 at addr ffff8880757e81d0 by task syz.1.1644/10107 CPU: 1 UID: 0 PID: 10107 Comm: syz.1.1644 Not tainted 6.16.0-rc6-next-20250716-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x230 mm/kasan/report.c:480 kasan_report+0x118/0x150 mm/kasan/report.c:593 tcp_can_ingest net/ipv4/tcp_input.c:4896 [inline] tcp_prune_ofo_queue+0x37e/0x6e0 net/ipv4/tcp_input.c:5520 tcp_prune_queue net/ipv4/tcp_input.c:5575 [inline] tcp_try_rmem_schedule+0xb6b/0x1830 net/ipv4/tcp_input.c:4907 tcp_data_queue+0x4e3/0x6380 net/ipv4/tcp_input.c:5192 tcp_rcv_established+0xf9e/0x1eb0 net/ipv4/tcp_input.c:6208 tcp_v4_do_rcv+0xa23/0xce0 net/ipv4/tcp_ipv4.c:1925 sk_backlog_rcv include/net/sock.h:1148 [inline] __release_sock+0x21c/0x350 net/core/sock.c:3188 release_sock+0x5f/0x1f0 net/core/sock.c:3742 tcp_sendmsg+0x39/0x50 net/ipv4/tcp.c:1394 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x19c/0x270 net/socket.c:729 __sys_sendto+0x3bd/0x520 net/socket.c:2228 __do_sys_sendto net/socket.c:2235 [inline] __se_sys_sendto net/socket.c:2231 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2231 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4e7138e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4e6f1f6038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f4e715b5fa0 RCX: 00007f4e7138e929 RDX: 000000000000059a RSI: 0000200000000580 RDI: 0000000000000004 RBP: 00007f4e71410b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000010008095 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4e715b5fa0 R15: 00007ffee3f6fc08 Allocated by task 10107: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_node_noprof+0x1bb/0x3c0 mm/slub.c:4281 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:659 alloc_skb_fclone include/linux/skbuff.h:1386 [inline] tcp_stream_alloc_skb+0x3d/0x340 net/ipv4/tcp.c:892 tso_fragment net/ipv4/tcp_output.c:2174 [inline] tcp_write_xmit+0xeec/0x67f0 net/ipv4/tcp_output.c:2819 __tcp_push_pending_frames+0x97/0x360 net/ipv4/tcp_output.c:3016 tcp_push_pending_frames include/net/tcp.h:2173 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5662 [inline] tcp_rcv_established+0x1012/0x1eb0 net/ipv4/tcp_input.c:6210 tcp_v4_do_rcv+0xa23/0xce0 net/ipv4/tcp_ipv4.c:1925 sk_backlog_rcv include/net/sock.h:1148 [inline] __release_sock+0x21c/0x350 net/core/sock.c:3188 release_sock+0x5f/0x1f0 net/core/sock.c:3742 tcp_sendmsg+0x39/0x50 net/ipv4/tcp.c:1394 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x19c/0x270 net/socket.c:729 __sys_sendto+0x3bd/0x520 net/socket.c:2228 __do_sys_sendto net/socket.c:2235 [inline] __se_sys_sendto net/socket.c:2231 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2231 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 10107: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4782 tcp_prune_ofo_queue+0x198/0x6e0 net/ipv4/tcp_input.c:5517 tcp_prune_queue net/ipv4/tcp_input.c:5575 [inline] tcp_try_rmem_schedule+0xb6b/0x1830 net/ipv4/tcp_input.c:4907 tcp_data_queue+0x4e3/0x6380 net/ipv4/tcp_input.c:5192 tcp_rcv_established+0xf9e/0x1eb0 net/ipv4/tcp_input.c:6208 tcp_v4_do_rcv+0xa23/0xce0 net/ipv4/tcp_ipv4.c:1925 sk_backlog_rcv include/net/sock.h:1148 [inline] __release_sock+0x21c/0x350 net/core/sock.c:3188 release_sock+0x5f/0x1f0 net/core/sock.c:3742 tcp_sendmsg+0x39/0x50 net/ipv4/tcp.c:1394 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x19c/0x270 net/socket.c:729 __sys_sendto+0x3bd/0x520 net/socket.c:2228 __do_sys_sendto net/socket.c:2235 [inline] __se_sys_sendto net/socket.c:2231 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2231 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880757e8000 which belongs to the cache skbuff_fclone_cache of size 488 The buggy address is located 464 bytes inside of freed 488-byte region [ffff8880757e8000, ffff8880757e81e8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x757e8 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888140ae8b40 dead000000000100 dead000000000122 raw: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888140ae8b40 dead000000000100 dead000000000122 head: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffea0001d5fa01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5832, tgid 5832 (sshd-session), ts 79690295816, free_ts 32611100162 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_node_noprof+0x280/0x3c0 mm/slub.c:4281 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:659 alloc_skb_fclone include/linux/skbuff.h:1386 [inline] tcp_stream_alloc_skb+0x3d/0x340 net/ipv4/tcp.c:892 tcp_sendmsg_locked+0xefc/0x56d0 net/ipv4/tcp.c:1198 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1393 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x19c/0x270 net/socket.c:729 sock_write_iter+0x258/0x330 net/socket.c:1179 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x54b/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 __free_pages mm/page_alloc.c:5260 [inline] free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7117 destroy_args+0x7e/0x5d0 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x404/0x420 mm/debug_vm_pgtable.c:1340 do_one_initcall+0x233/0x820 init/main.c:1269 do_initcall_level+0x137/0x1f0 init/main.c:1331 do_initcalls+0x69/0xd0 init/main.c:1347 kernel_init_freeable+0x3d9/0x590 init/main.c:1579 kernel_init+0x1d/0x1d0 init/main.c:1469 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880757e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880757e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880757e8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff8880757e8200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880757e8280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================