================================================================== 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 ffff8880516b4720 by task syz.0.886/8620 CPU: 1 UID: 0 PID: 8620 Comm: syz.0.886 Not tainted 6.16.0-rc5-syzkaller-01444-g55e8757c6962 #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:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 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:0x7f2fa378e929 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:00007f2fa469b038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f2fa39b5fa0 RCX: 00007f2fa378e929 RDX: 000000000000059a RSI: 0000200000000580 RDI: 0000000000000003 RBP: 00007f2fa3810b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000010008095 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2fa39b5fa0 R15: 00007ffdfc90d488 Allocated by task 8620: 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_mempool_unpoison_object+0xa0/0x170 mm/kasan/common.c:547 kasan_mempool_unpoison_object include/linux/kasan.h:388 [inline] napi_skb_cache_get+0x37b/0x6d0 net/core/skbuff.c:295 __napi_build_skb net/core/skbuff.c:528 [inline] napi_build_skb+0x1d/0x290 net/core/skbuff.c:550 skb_pp_cow_data+0x3c6/0x13e0 net/core/skbuff.c:922 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x699/0x11a0 net/core/dev.c:5438 __netif_receive_skb_core+0x17f9/0x4010 net/core/dev.c:5788 __netif_receive_skb_one_core net/core/dev.c:5973 [inline] __netif_receive_skb+0x72/0x380 net/core/dev.c:6088 process_backlog+0x60e/0x14f0 net/core/dev.c:6440 __napi_poll+0xc7/0x480 net/core/dev.c:7477 napi_poll net/core/dev.c:7541 [inline] net_rx_action+0x707/0xe30 net/core/dev.c:7668 handle_softirqs+0x286/0x870 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:910 [inline] __dev_queue_xmit+0x1d79/0x3b50 net/core/dev.c:4740 dev_queue_xmit include/linux/netdevice.h:3357 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0xd03/0x1160 net/ipv4/ip_output.c:235 ip_local_out net/ipv4/ip_output.c:129 [inline] __ip_queue_xmit+0x1106/0x1b00 net/ipv4/ip_output.c:527 __tcp_transmit_skb+0x225c/0x36c0 net/ipv4/tcp_output.c:1479 tcp_transmit_skb net/ipv4/tcp_output.c:1497 [inline] tcp_write_xmit+0x1862/0x67f0 net/ipv4/tcp_output.c:2833 __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_sendmsg+0x52d/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmmsg+0x227/0x430 net/socket.c:2757 __do_sys_sendmmsg net/socket.c:2784 [inline] __se_sys_sendmmsg net/socket.c:2781 [inline] __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2781 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 8620: 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:2381 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4745 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 ffff8880516b4640 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 224 bytes inside of freed 240-byte region [ffff8880516b4640, ffff8880516b4730) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x516b4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801ea998c0 ffffea0000c488c0 dead000000000002 raw: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5833, tgid 5833 (syz-executor), ts 122187292853, free_ts 122186520588 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_node_noprof+0x280/0x3c0 mm/slub.c:4249 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:659 skb_copy+0x188/0x800 net/core/skbuff.c:2124 mac80211_hwsim_tx_frame_no_nl+0xcd3/0x11c0 drivers/net/wireless/virtual/mac80211_hwsim.c:1871 mac80211_hwsim_tx_frame+0x1b5/0x200 drivers/net/wireless/virtual/mac80211_hwsim.c:2222 mac80211_hwsim_beacon_tx+0x3f0/0x860 drivers/net/wireless/virtual/mac80211_hwsim.c:2323 __iterate_interfaces+0x2ab/0x590 net/mac80211/util.c:761 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:797 mac80211_hwsim_beacon+0xbb/0x1c0 drivers/net/wireless/virtual/mac80211_hwsim.c:2353 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x529/0xc60 kernel/time/hrtimer.c:1825 page last free pid 5833 tgid 5833 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 poll_freewait+0x1d4/0x240 fs/select.c:153 do_select+0x172f/0x17e0 fs/select.c:608 core_sys_select+0x6dd/0xa20 fs/select.c:677 do_pselect fs/select.c:759 [inline] __do_sys_pselect6 fs/select.c:802 [inline] __se_sys_pselect6+0x27a/0x300 fs/select.c:793 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 Memory state around the buggy address: ffff8880516b4600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8880516b4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880516b4700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff8880516b4780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880516b4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ==================================================================