================================================================== 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:2722 [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 ffff888057310108 by task syz.0.2629/15888 CPU: 1 UID: 0 PID: 15888 Comm: syz.0.2629 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 read_pnet include/net/net_namespace.h:414 [inline] dev_net include/linux/netdevice.h:2722 [inline] nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319 __nf_unregister_net_hook+0x74/0x700 net/netfilter/core.c:491 nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:8979 [inline] __nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:8994 [inline] nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:9006 [inline] nf_tables_commit+0x4062/0xa1b0 net/netfilter/nf_tables_api.c:11165 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:576 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:649 [inline] nfnetlink_rcv+0x1ac9/0x2590 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:742 ____sys_sendmsg+0x505/0x830 net/socket.c:2630 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2684 __sys_sendmsg+0x164/0x220 net/socket.c:2716 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf70ad539 Code: 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f547c55c EFLAGS: 00000206 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000080000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 15489: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:342 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4955 [inline] slab_alloc_node mm/slub.c:5265 [inline] kmem_cache_alloc_noprof+0x367/0x6e0 mm/slub.c:5272 bvec_alloc block/bio.c:204 [inline] bio_alloc_bioset+0x4e0/0x1160 block/bio.c:573 bio_alloc include/linux/bio.h:372 [inline] do_mpage_readpage+0x15ce/0x1990 fs/mpage.c:287 mpage_readahead+0x3b0/0x790 fs/mpage.c:371 read_pages+0x17a/0x580 mm/readahead.c:163 page_cache_ra_order+0x922/0xe70 mm/readahead.c:518 filemap_readahead mm/filemap.c:2606 [inline] filemap_get_pages+0x7fd/0x1de0 mm/filemap.c:2652 filemap_splice_read+0x581/0xc60 mm/filemap.c:3027 do_splice_read fs/splice.c:982 [inline] splice_direct_to_actor+0x4a9/0xcc0 fs/splice.c:1086 do_splice_direct_actor fs/splice.c:1204 [inline] do_splice_direct+0x181/0x270 fs/splice.c:1230 do_sendfile+0x4da/0x7e0 fs/read_write.c:1370 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 15489: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2523 [inline] slab_free mm/slub.c:6611 [inline] kmem_cache_free+0x19b/0x690 mm/slub.c:6721 bvec_free block/bio.c:169 [inline] bio_free+0x200/0x2a0 block/bio.c:236 blk_update_request+0x57e/0xe60 block/blk-mq.c:998 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1160 nullb_complete_cmd drivers/block/null_blk/main.c:1402 [inline] null_handle_cmd drivers/block/null_blk/main.c:1454 [inline] null_queue_rq+0xbfe/0xe30 drivers/block/null_blk/main.c:1693 null_queue_rqs+0x123/0x270 drivers/block/null_blk/main.c:1707 __blk_mq_flush_list block/blk-mq.c:2837 [inline] blk_mq_dispatch_queue_requests+0x417/0x800 block/blk-mq.c:2882 blk_mq_flush_plug_list+0x432/0x550 block/blk-mq.c:2970 __blk_flush_plug+0x3d3/0x4b0 block/blk-core.c:1225 blk_finish_plug+0x5e/0x90 block/blk-core.c:1252 read_pages+0x3b2/0x580 mm/readahead.c:176 page_cache_ra_order+0x922/0xe70 mm/readahead.c:518 filemap_readahead mm/filemap.c:2606 [inline] filemap_get_pages+0x7fd/0x1de0 mm/filemap.c:2652 filemap_splice_read+0x581/0xc60 mm/filemap.c:3027 do_splice_read fs/splice.c:982 [inline] splice_direct_to_actor+0x4a9/0xcc0 fs/splice.c:1086 do_splice_direct_actor fs/splice.c:1204 [inline] do_splice_direct+0x181/0x270 fs/splice.c:1230 do_sendfile+0x4da/0x7e0 fs/read_write.c:1370 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888057310000 which belongs to the cache biovec-64 of size 1024 The buggy address is located 264 bytes inside of freed 1024-byte region [ffff888057310000, ffff888057310400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57310 head: order:2 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 ffff88801f2d53c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000e000e 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801f2d53c0 dead000000000122 0000000000000000 head: 0000000000000000 00000000000e000e 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00015cc401 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 15489, tgid 15486 (syz.1.2514), ts 967324959133, free_ts 963761552415 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3039 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3212 new_slab mm/slub.c:3266 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4636 __slab_alloc+0x65/0x100 mm/slub.c:4755 __slab_alloc_node mm/slub.c:4831 [inline] slab_alloc_node mm/slub.c:5253 [inline] kmem_cache_alloc_noprof+0x3f9/0x6e0 mm/slub.c:5272 bvec_alloc block/bio.c:204 [inline] bio_alloc_bioset+0x4e0/0x1160 block/bio.c:573 bio_alloc include/linux/bio.h:372 [inline] do_mpage_readpage+0x15ce/0x1990 fs/mpage.c:287 mpage_readahead+0x3b0/0x790 fs/mpage.c:371 read_pages+0x17a/0x580 mm/readahead.c:163 page_cache_ra_order+0x922/0xe70 mm/readahead.c:518 filemap_readahead mm/filemap.c:2606 [inline] filemap_get_pages+0x7fd/0x1de0 mm/filemap.c:2652 filemap_splice_read+0x581/0xc60 mm/filemap.c:3027 do_splice_read fs/splice.c:982 [inline] splice_direct_to_actor+0x4a9/0xcc0 fs/splice.c:1086 page last free pid 15454 tgid 15449 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:2963 folios_put_refs+0x584/0x670 mm/swap.c:1002 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:383 truncate_bdev_range+0xde/0x100 block/bdev.c:125 blkdev_fallocate+0x420/0x530 block/fops.c:934 vfs_fallocate+0x669/0x7e0 fs/open.c:342 madvise_remove mm/madvise.c:1049 [inline] madvise_vma_behavior+0x31b3/0x3a10 mm/madvise.c:1346 madvise_walk_vmas+0x51c/0xa30 mm/madvise.c:1669 madvise_do_behavior+0x38e/0x550 mm/madvise.c:1885 do_madvise+0x1bc/0x270 mm/madvise.c:1978 __do_sys_madvise mm/madvise.c:1987 [inline] __se_sys_madvise mm/madvise.c:1985 [inline] __ia32_sys_madvise+0xa7/0xc0 mm/madvise.c:1985 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffff888057310000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057310080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888057310100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888057310180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057310200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 4: 10 07 adc %al,(%rdi) 6: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi a: 10 08 adc %cl,(%rax) c: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 90 nop 33: 90 nop 34: 90 nop 35: 90 nop 36: 90 nop 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop