================================================================== BUG: KASAN: slab-use-after-free in read_pnet include/net/net_namespace.h:414 [inline] BUG: KASAN: slab-use-after-free in dev_net include/linux/netdevice.h:2741 [inline] BUG: KASAN: slab-use-after-free in nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319 Read of size 8 at addr ffff888057a44108 by task syz.0.2370/15161 CPU: 0 UID: 0 PID: 15161 Comm: syz.0.2370 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/13/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 read_pnet include/net/net_namespace.h:414 [inline] dev_net include/linux/netdevice.h:2741 [inline] nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319 __nf_unregister_net_hook+0x74/0x6f0 net/netfilter/core.c:491 nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:9041 [inline] __nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:9056 [inline] nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:9068 [inline] nf_tables_commit+0x4270/0xa400 net/netfilter/nf_tables_api.c:11227 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:576 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:649 [inline] nfnetlink_rcv+0x1c1b/0x27b0 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x80f/0x9b0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0xa68/0xad0 net/socket.c:2592 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646 __sys_sendmsg net/socket.c:2678 [inline] __do_sys_sendmsg net/socket.c:2683 [inline] __se_sys_sendmsg net/socket.c:2681 [inline] __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2681 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f182e79acb9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f182f6ee028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f182ea15fa0 RCX: 00007f182e79acb9 RDX: 0000000000000000 RSI: 000020000000c2c0 RDI: 0000000000000005 RBP: 00007f182e808bf7 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f182ea16038 R14: 00007f182ea15fa0 R15: 00007ffd2c4d3e18 Allocated by task 5819: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x427/0x6f0 mm/slub.c:5315 kmalloc_reserve net/core/skbuff.c:612 [inline] __alloc_skb+0x27d/0x7d0 net/core/skbuff.c:712 alloc_skb_fclone include/linux/skbuff.h:1433 [inline] tcp_stream_alloc_skb+0x3d/0x350 net/ipv4/tcp.c:923 tcp_sendmsg_locked+0x131c/0x53b0 net/ipv4/tcp.c:1248 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1443 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] sock_write_iter+0x421/0x550 net/socket.c:1195 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:686 ksys_write+0x150/0x270 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15061: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6674 [inline] kmem_cache_free+0x195/0x610 mm/slub.c:6785 skb_kfree_head net/core/skbuff.c:1086 [inline] skb_free_head net/core/skbuff.c:1100 [inline] skb_release_data+0x688/0x8e0 net/core/skbuff.c:1127 skb_release_all net/core/skbuff.c:1202 [inline] __kfree_skb+0x5d/0x210 net/core/skbuff.c:1216 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3648 [inline] tcp_ack+0x26ed/0x7890 net/ipv4/tcp_input.c:4273 tcp_rcv_established+0x13e6/0x25b0 net/ipv4/tcp_input.c:6528 tcp_v4_do_rcv+0xa90/0x1430 net/ipv4/tcp_ipv4.c:1881 tcp_v4_rcv+0x2d27/0x3780 net/ipv4/tcp_ipv4.c:2324 ip_protocol_deliver_rcu+0x221/0x440 net/ipv4/ip_input.c:207 ip_local_deliver_finish+0x3bb/0x6f0 net/ipv4/ip_input.c:241 NF_HOOK+0x336/0x3c0 include/linux/netfilter.h:318 dst_input include/net/dst.h:474 [inline] ip_sublist_rcv_finish+0x221/0x2a0 net/ipv4/ip_input.c:584 ip_list_rcv_finish net/ipv4/ip_input.c:636 [inline] ip_sublist_rcv+0x761/0xa70 net/ipv4/ip_input.c:644 ip_list_rcv+0x3f1/0x450 net/ipv4/ip_input.c:678 __netif_receive_skb_list_ptype net/core/dev.c:6194 [inline] __netif_receive_skb_list_core+0x7e5/0x810 net/core/dev.c:6241 __netif_receive_skb_list net/core/dev.c:6293 [inline] netif_receive_skb_list_internal+0x995/0xcf0 net/core/dev.c:6384 gro_normal_list include/net/gro.h:523 [inline] gro_flush_normal include/net/gro.h:531 [inline] napi_complete_done+0x299/0x730 net/core/dev.c:6753 virtqueue_napi_complete drivers/net/virtio_net.c:749 [inline] virtnet_poll+0x259e/0x2fe0 drivers/net/virtio_net.c:3091 __napi_poll+0xae/0x340 net/core/dev.c:7680 napi_poll net/core/dev.c:7743 [inline] net_rx_action+0x627/0xf70 net/core/dev.c:7895 handle_softirqs+0x22a/0x7c0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 common_interrupt+0xbb/0xe0 arch/x86/kernel/irq.c:319 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 The buggy address belongs to the object at ffff888057a44000 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 264 bytes inside of freed 704-byte region [ffff888057a44000, ffff888057a442c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57a44 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888140ed5c80 ffffea0001590f00 dead000000000003 raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888140ed5c80 ffffea0001590f00 dead000000000003 head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00015e9101 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 12844, tgid 12843 (syz.2.1737), ts 220715322019, free_ts 220697702425 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3a0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xd82/0x1760 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_node_noprof+0x4b5/0x6f0 mm/slub.c:5315 kmalloc_reserve net/core/skbuff.c:612 [inline] __alloc_skb+0x27d/0x7d0 net/core/skbuff.c:712 alloc_skb_fclone include/linux/skbuff.h:1433 [inline] tipc_buf_acquire net/tipc/msg.c:72 [inline] tipc_msg_build+0x160/0xd60 net/tipc/msg.c:390 __tipc_sendmsg+0x1902/0x2ba0 net/tipc/socket.c:1501 tipc_sendmsg+0x55/0x70 net/tipc/socket.c:1399 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0xa68/0xad0 net/socket.c:2592 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646 __sys_sendmmsg+0x27c/0x4e0 net/socket.c:2735 __do_sys_sendmmsg net/socket.c:2762 [inline] __se_sys_sendmmsg net/socket.c:2759 [inline] __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2759 page last free pid 80 tgid 80 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xbf8/0xd70 mm/page_alloc.c:2973 ops_free_list net/core/net_namespace.c:215 [inline] ops_undo_list+0x81e/0x940 net/core/net_namespace.c:256 cleanup_net+0x4df/0x7b0 net/core/net_namespace.c:696 process_one_work kernel/workqueue.c:3257 [inline] process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3340 worker_thread+0xda6/0x1360 kernel/workqueue.c:3421 kthread+0x726/0x8b0 kernel/kthread.c:463 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888057a44000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057a44080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888057a44100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888057a44180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057a44200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================