================================================================== BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0x6bf/0x900 kernel/bpf/stackmap.c:271 Write of size 128 at addr ffff88802d0c9890 by task syz.0.17/5920 CPU: 1 PID: 5920 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: <#DB> dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x241/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 __bpf_get_stackid+0x6bf/0x900 kernel/bpf/stackmap.c:271 ____bpf_get_stackid_pe kernel/bpf/stackmap.c:362 [inline] bpf_get_stackid_pe+0x343/0x410 kernel/bpf/stackmap.c:331 bpf_prog_6611c23d801ea08d+0x29/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline] __bpf_prog_run include/linux/filter.h:616 [inline] bpf_prog_run include/linux/filter.h:623 [inline] bpf_overflow_handler+0x1fc/0x510 kernel/events/core.c:10547 __perf_event_overflow+0x447/0x630 kernel/events/core.c:9718 perf_swevent_overflow kernel/events/core.c:9794 [inline] perf_swevent_event+0x324/0x630 kernel/events/core.c:-1 perf_bp_event+0x2a7/0x380 kernel/events/core.c:10739 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x23e/0x670 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain+0x197/0x380 kernel/notifier.c:93 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231 notify_die+0x145/0x1a0 kernel/notifier.c:596 notify_debug+0x2e/0x50 arch/x86/kernel/traps.c:1042 exc_debug_kernel arch/x86/kernel/traps.c:1099 [inline] exc_debug+0xde/0x140 arch/x86/kernel/traps.c:1199 asm_exc_debug+0x1e/0x40 arch/x86/include/asm/idtentry.h:644 RIP: 0010:__get_user_nocheck_8+0xd/0x20 arch/x86/lib/getuser.S:143 Code: fa 0f 01 cb 0f ae e8 8b 10 31 c0 0f 01 ca c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 01 cb 0f ae e8 48 8b 10 <31> c0 0f 01 ca c3 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 01 ca RSP: 0000:ffffc900044cf618 EFLAGS: 00040802 RAX: 0000200000000300 RBX: 00000000ffffffff RCX: 1ffff92000899ee2 RDX: 00006370692f736e RSI: 0000200000000300 RDI: 0000000000000000 RBP: 0000200000000300 R08: 000000000000007f R09: 0000000000000000 R10: dffffc0000000000 R11: fffffbfff2237ea1 R12: 0000000000000001 R13: 1ffff92000899ee0 R14: 000000000000007f R15: dffffc0000000000 perf_callchain_user+0xbe4/0x15c0 arch/x86/events/core.c:2957 get_perf_callchain+0x394/0x510 kernel/events/callchain.c:219 perf_callchain kernel/events/core.c:7740 [inline] perf_sample_save_callchain include/linux/perf_event.h:1232 [inline] perf_prepare_sample+0x3c7/0x1df0 kernel/events/core.c:7784 __perf_event_output kernel/events/core.c:7972 [inline] perf_event_output_forward+0x187/0x3e0 kernel/events/core.c:7993 __perf_event_overflow+0x447/0x630 kernel/events/core.c:9718 perf_swevent_overflow kernel/events/core.c:9794 [inline] perf_swevent_event+0x324/0x630 kernel/events/core.c:-1 perf_bp_event+0x2a7/0x380 kernel/events/core.c:10739 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x2fb/0x670 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain+0x197/0x380 kernel/notifier.c:93 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231 notify_die+0x145/0x1a0 kernel/notifier.c:596 notify_debug+0x2e/0x50 arch/x86/kernel/traps.c:1042 exc_debug_user arch/x86/kernel/traps.c:1168 [inline] noist_exc_debug+0x77/0x120 arch/x86/kernel/traps.c:1205 asm_exc_debug+0x33/0x40 arch/x86/include/asm/idtentry.h:644 RIP: 0033:0x7eff12d7b43d Code: 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 89 f8 48 89 fa c5 f9 ef c0 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 27 01 00 00 c5 fd 74 0f fd d7 c1 85 c0 74 5b f3 0f bc c0 e9 30 01 00 00 66 90 f3 0f bc RSP: 002b:00007fff3f9c82b8 EFLAGS: 00000283 RAX: 0000000000000300 RBX: 00007fff3f9c87f0 RCX: 2f666c65732f636f RDX: 0000200000000300 RSI: 00007eff12e5c9c0 RDI: 0000200000000300 RBP: 0000200000000300 R08: 00007fff3f9c8a20 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000073 R14: 00007eff12e31e03 R15: 00007fff3f9c88b0 Allocated by task 5920: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc_node+0xb4/0x230 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] __bpf_map_area_alloc kernel/bpf/syscall.c:303 [inline] bpf_map_area_alloc+0x5e/0x110 kernel/bpf/syscall.c:316 prealloc_elems_and_freelist+0x86/0x1c0 kernel/bpf/stackmap.c:51 stack_map_alloc+0x33a/0x4c0 kernel/bpf/stackmap.c:114 map_create+0x877/0x12f0 kernel/bpf/syscall.c:1247 __sys_bpf+0x651/0x890 kernel/bpf/syscall.c:5458 __do_sys_bpf kernel/bpf/syscall.c:5580 [inline] __se_sys_bpf kernel/bpf/syscall.c:5578 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5578 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88802d0c9880 which belongs to the cache kmalloc-cg-64 of size 64 The buggy address is located 16 bytes inside of allocated 40-byte region [ffff88802d0c9880, ffff88802d0c98a8) The buggy address belongs to the physical page: page:ffffea0000b43240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2d0c9 memcg:ffff88803177d801 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017c4da00 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080200020 00000001ffffffff ffff88803177d801 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 11, tgid 11 (kworker/u4:0), ts 99501997825, free_ts 99478466886 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581 prep_new_page mm/page_alloc.c:1588 [inline] get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4486 alloc_slab_page+0x5d/0x160 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] __kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node+0xa4/0x230 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] kvmalloc_node+0x70/0x180 mm/util.c:617 kvmalloc include/linux/slab.h:738 [inline] kvzalloc include/linux/slab.h:746 [inline] allocate_hook_entries_size net/netfilter/core.c:61 [inline] __nf_hook_entries_try_shrink+0x310/0x6d0 net/netfilter/core.c:260 __nf_unregister_net_hook+0x4e1/0x6e0 net/netfilter/core.c:520 nf_unregister_net_hook net/netfilter/core.c:-1 [inline] nf_unregister_net_hooks+0xcb/0x130 net/netfilter/core.c:613 nf_defrag_ipv6_disable+0x95/0xe0 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:174 nf_ct_netns_do_put net/netfilter/nf_conntrack_proto.c:545 [inline] nf_ct_netns_put+0x375/0x520 net/netfilter/nf_conntrack_proto.c:-1 nf_conncount_destroy+0x41/0x150 net/netfilter/nf_conncount.c:662 ovs_ct_limit_exit net/openvswitch/conntrack.c:1597 [inline] ovs_ct_exit+0x9c/0x200 net/openvswitch/conntrack.c:2000 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1181 [inline] free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2458 __slab_free+0x35a/0x400 mm/slub.c:3736 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x11a/0x2d0 mm/slub.c:3519 getname_flags+0xbb/0x500 fs/namei.c:140 do_sys_openat2+0xda/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1447 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88802d0c9780: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff88802d0c9800: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff88802d0c9880: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802d0c9900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802d0c9980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: fa cli 1: 0f 01 cb stac 4: 0f ae e8 lfence 7: 8b 10 mov (%rax),%edx 9: 31 c0 xor %eax,%eax b: 0f 01 ca clac e: c3 ret f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: f3 0f 1e fa endbr64 21: 0f 01 cb stac 24: 0f ae e8 lfence 27: 48 8b 10 mov (%rax),%rdx * 2a: 31 c0 xor %eax,%eax <-- trapping instruction 2c: 0f 01 ca clac 2f: c3 ret 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: 0f 01 ca clac