================================================================== 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 ffff888059435420 by task syz.1.130/6251 CPU: 1 UID: 0 PID: 6251 Comm: syz.1.130 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+0x82f/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:0x7f0757f8eba9 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:00007ffd89be4158 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f07581d5fa0 RCX: 00007f0757f8eba9 RDX: 0000000000000000 RSI: 000020000000c2c0 RDI: 0000000000000003 RBP: 00007f0758011e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f07581d5fa0 R14: 00007f07581d5fa0 R15: 0000000000000003 Allocated by task 6250: 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+0x82f/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 6250: 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+0x82f/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 ffff888059435400 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 32 bytes inside of freed 192-byte region [ffff888059435400, ffff8880594354c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59435 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a4413c0 ffffea0000c68e40 0000000000000006 raw: 0000000000000000 0000000000100010 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5973, tgid 5973 (syz-executor), ts 64179995937, free_ts 61713515353 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:2492 [inline] allocate_slab+0x8a/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] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4402 kmalloc_noprof include/linux/slab.h:905 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:664 [inline] netdevice_event+0x3a1/0x8a0 drivers/infiniband/core/roce_gid_mgmt.c:823 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] register_netdevice+0x1608/0x1ae0 net/core/dev.c:11244 macvlan_common_newlink+0x120a/0x1980 drivers/net/macvlan.c:1540 rtnl_newlink_create+0x30d/0xb00 net/core/rtnetlink.c:3825 __rtnl_newlink net/core/rtnetlink.c:3942 [inline] rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4057 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6946 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346 page last free pid 5920 tgid 5920 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 vfree+0x25a/0x400 mm/vmalloc.c:3434 kcov_put kernel/kcov.c:439 [inline] kcov_close+0x28/0x50 kernel/kcov.c:535 __fput+0x449/0xa70 fs/file_table.c:468 task_work_run+0x1d1/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x6b5/0x2300 kernel/exit.c:961 do_group_exit+0x21c/0x2d0 kernel/exit.c:1102 get_signal+0x1286/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888059435300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888059435380: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff888059435400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888059435480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888059435500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================