================================================================== BUG: KASAN: slab-use-after-free in flow_block_cb_is_busy net/core/flow_offload.c:328 [inline] BUG: KASAN: slab-use-after-free in flow_block_cb_setup_simple+0x1cc/0x740 net/core/flow_offload.c:353 Read of size 8 at addr ffff8880249ce720 by task syz.4.144/6291 CPU: 1 UID: 0 PID: 6291 Comm: syz.4.144 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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 flow_block_cb_is_busy net/core/flow_offload.c:328 [inline] flow_block_cb_setup_simple+0x1cc/0x740 net/core/flow_offload.c:353 nft_block_offload_cmd net/netfilter/nf_tables_offload.c:397 [inline] nft_chain_offload_cmd+0x290/0x660 net/netfilter/nf_tables_offload.c:451 nft_flow_block_chain net/netfilter/nf_tables_offload.c:471 [inline] nft_flow_offload_chain net/netfilter/nf_tables_offload.c:513 [inline] nft_flow_rule_offload_commit+0x814/0x1b60 net/netfilter/nf_tables_offload.c:584 nf_tables_commit+0x675/0x8700 net/netfilter/nf_tables_api.c:10933 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:574 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:647 [inline] nfnetlink_rcv+0x1a4e/0x2520 net/netfilter/nfnetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82c/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:729 ____sys_sendmsg+0x505/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmsg net/socket.c:2700 [inline] __do_sys_sendmsg net/socket.c:2705 [inline] __se_sys_sendmsg net/socket.c:2703 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703 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:0x7f3f0658eec9 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:00007ffc85ecdd88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3f067e5fa0 RCX: 00007f3f0658eec9 RDX: 0000000000000000 RSI: 000020000000c2c0 RDI: 0000000000000003 RBP: 00007f3f06611f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3f067e5fa0 R14: 00007f3f067e5fa0 R15: 0000000000000003 Allocated by task 6294: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4407 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] flow_block_cb_alloc net/core/flow_offload.c:267 [inline] flow_block_cb_setup_simple+0x2a1/0x740 net/core/flow_offload.c:356 nft_block_offload_cmd net/netfilter/nf_tables_offload.c:397 [inline] nft_chain_offload_cmd+0x290/0x660 net/netfilter/nf_tables_offload.c:451 nft_flow_block_chain net/netfilter/nf_tables_offload.c:471 [inline] nft_flow_offload_chain net/netfilter/nf_tables_offload.c:513 [inline] nft_flow_rule_offload_commit+0x814/0x1b60 net/netfilter/nf_tables_offload.c:584 nf_tables_commit+0x675/0x8700 net/netfilter/nf_tables_api.c:10933 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:574 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:647 [inline] nfnetlink_rcv+0x1a4e/0x2520 net/netfilter/nfnetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82c/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:729 ____sys_sendmsg+0x505/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmsg net/socket.c:2700 [inline] __do_sys_sendmsg net/socket.c:2705 [inline] __se_sys_sendmsg net/socket.c:2703 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703 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 6294: 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:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kfree+0x18e/0x440 mm/slub.c:4894 nft_flow_offload_unbind+0x3c0/0x440 net/netfilter/nf_tables_offload.c:344 nft_chain_offload_cmd+0x43f/0x660 net/netfilter/nf_tables_offload.c:-1 nft_flow_block_chain net/netfilter/nf_tables_offload.c:471 [inline] nft_flow_offload_chain net/netfilter/nf_tables_offload.c:513 [inline] nft_flow_rule_offload_commit+0x40d/0x1b60 net/netfilter/nf_tables_offload.c:592 nf_tables_commit+0x675/0x8700 net/netfilter/nf_tables_api.c:10933 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:574 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:647 [inline] nfnetlink_rcv+0x1a4e/0x2520 net/netfilter/nfnetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82c/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:729 ____sys_sendmsg+0x505/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmsg net/socket.c:2700 [inline] __do_sys_sendmsg net/socket.c:2705 [inline] __se_sys_sendmsg net/socket.c:2703 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703 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 ffff8880249ce700 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 32 bytes inside of freed 192-byte region [ffff8880249ce700, ffff8880249ce7c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x249ce ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a4413c0 ffffea00007da940 dead000000000007 raw: 0000000000000000 0000000080100010 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 1, tgid 1 (swapper/0), ts 7403989232, free_ts 0 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_slab_page mm/slub.c:2494 [inline] allocate_slab+0x65/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0xbeb/0x1420 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kvmalloc_node_noprof+0x429/0x5f0 mm/slub.c:5067 sbitmap_init_node+0x2c9/0x630 lib/sbitmap.c:132 blk_mq_alloc_hctx block/blk-mq.c:4032 [inline] blk_mq_alloc_and_init_hctx+0x4ea/0xd60 block/blk-mq.c:4504 __blk_mq_realloc_hw_ctxs+0x169/0x400 block/blk-mq.c:4535 blk_mq_realloc_hw_ctxs block/blk-mq.c:4562 [inline] blk_mq_init_allocated_queue+0x400/0x1490 block/blk-mq.c:4594 blk_mq_alloc_queue block/blk-mq.c:4404 [inline] __blk_mq_alloc_disk+0x1f0/0x340 block/blk-mq.c:4447 loop_add+0x411/0xad0 drivers/block/loop.c:2043 loop_init+0xd9/0x170 drivers/block/loop.c:2278 do_one_initcall+0x233/0x820 init/main.c:1269 do_initcall_level+0x104/0x190 init/main.c:1331 do_initcalls+0x59/0xa0 init/main.c:1347 page_owner free stack trace missing Memory state around the buggy address: ffff8880249ce600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880249ce680: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff8880249ce700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880249ce780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880249ce800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================