================================================================== BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0x6fa/0x960 kernel/bpf/stackmap.c:274 Write of size 232 at addr ffff88811a86ce10 by task syz-executor/2971 CPU: 1 PID: 2971 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 memcpy+0x44/0x70 mm/kasan/shadow.c:66 __bpf_get_stackid+0x6fa/0x960 kernel/bpf/stackmap.c:274 ____bpf_get_stackid_pe kernel/bpf/stackmap.c:365 [inline] bpf_get_stackid_pe+0x2ee/0x400 kernel/bpf/stackmap.c:334 bpf_prog_7e7ce9aebb772b6e+0x21/0x31 bpf_dispatcher_nop_func include/linux/bpf.h:987 [inline] __bpf_prog_run include/linux/filter.h:607 [inline] bpf_prog_run include/linux/filter.h:614 [inline] bpf_overflow_handler+0x3c7/0x5e0 kernel/events/core.c:10273 __perf_event_overflow+0x458/0x640 kernel/events/core.c:9448 perf_swevent_overflow kernel/events/core.c:9531 [inline] perf_swevent_event+0x243/0x440 kernel/events/core.c:9582 do_perf_sw_event kernel/events/core.c:9695 [inline] ___perf_sw_event+0x3bf/0x500 kernel/events/core.c:9726 __perf_sw_event_sched include/linux/perf_event.h:1265 [inline] perf_event_task_sched_out include/linux/perf_event.h:1298 [inline] prepare_task_switch kernel/sched/core.c:5232 [inline] context_switch kernel/sched/core.c:5376 [inline] __schedule+0x1354/0x14b0 kernel/sched/core.c:6755 preempt_schedule_irq+0xaa/0x120 kernel/sched/core.c:7067 raw_irqentry_exit_cond_resched+0x29/0x30 kernel/entry/common.c:396 irqentry_exit+0x37/0x40 kernel/entry/common.c:439 sysvec_apic_timer_interrupt+0x64/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:unwind_get_return_address+0x6/0x90 arch/x86/kernel/unwind_frame.c:15 Code: 48 c7 c7 80 fe 0d 87 e8 48 52 81 00 eb a1 00 00 cc cc 00 00 90 90 90 90 90 90 90 90 90 90 90 b8 a3 2b a8 ac 55 48 89 e5 41 57 <41> 56 53 48 89 fb 49 be 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 RSP: 0018:ffffc90000e77530 EFLAGS: 00000202 RAX: 1ffff920001cee01 RBX: ffffc90000e77600 RCX: 00000000001cee01 RDX: ffffc90000e77680 RSI: 1ffff920001ceeaa RDI: ffffc90000e77548 RBP: ffffc90000e77538 R08: ffffc90000e77610 R09: ffffc90000e77608 R10: 0000000000000000 R11: fffff520001ceeb5 R12: ffff88810da3bcc0 R13: 00000000ffffffff R14: ffffffff81620340 R15: ffffc90000e77548 arch_stack_walk+0xfc/0x150 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0xa6/0xf0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:380 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc_node+0xb2/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x28a/0x460 mm/util.c:592 kvmalloc include/linux/slab.h:716 [inline] kvzalloc include/linux/slab.h:724 [inline] allocate_hook_entries_size net/netfilter/core.c:67 [inline] nf_hook_entries_grow+0x32a/0x770 net/netfilter/core.c:134 __nf_register_net_hook+0x225/0x820 net/netfilter/core.c:429 nf_register_net_hook+0xbb/0x1a0 net/netfilter/core.c:572 nf_register_net_hooks+0x47/0x1b0 net/netfilter/core.c:588 selinux_nf_register+0x21/0x30 security/selinux/hooks.c:7493 ops_init+0x2ce/0x470 net/core/net_namespace.c:138 setup_net+0x4b4/0xcd0 net/core/net_namespace.c:335 copy_net_ns+0x355/0x5c0 net/core/net_namespace.c:481 create_new_namespaces+0x3a8/0x660 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:226 ksys_unshare+0x4d7/0x820 kernel/fork.c:3426 __do_sys_unshare kernel/fork.c:3509 [inline] __se_sys_unshare kernel/fork.c:3507 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3507 x64_sys_call+0x767/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0aa4f9f167 Code: 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 10 01 00 00 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:00007ffff7ab3d78 EFLAGS: 00000206 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007f0aa5225f40 RCX: 00007f0aa4f9f167 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000 RBP: 00007f0aa52267b8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000008 R13: 0000000000000003 R14: 00007ffff7ab3fb8 R15: 0000000000000000 Allocated by task 2969: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:380 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc_node+0xb2/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:589 [inline] __bpf_map_area_alloc kernel/bpf/syscall.c:328 [inline] bpf_map_area_alloc+0x4b/0xe0 kernel/bpf/syscall.c:341 prealloc_elems_and_freelist+0x8a/0x1e0 kernel/bpf/stackmap.c:51 stack_map_alloc+0x398/0x520 kernel/bpf/stackmap.c:117 find_and_alloc_map kernel/bpf/syscall.c:133 [inline] map_create+0x467/0xcf0 kernel/bpf/syscall.c:1126 __sys_bpf+0x34e/0x850 kernel/bpf/syscall.c:4988 __do_sys_bpf kernel/bpf/syscall.c:5110 [inline] __se_sys_bpf kernel/bpf/syscall.c:5108 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5108 x64_sys_call+0x488/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88811a86ce00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 16 bytes inside of 64-byte region [ffff88811a86ce00, ffff88811a86ce40) The buggy address belongs to the physical page: page:ffffea00046a1b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a86c flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea0004679b80 dead000000000005 ffff888100042780 raw: 0000000000000000 0000000000200020 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 115, tgid 115 (udevd), ts 6386982910, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3e0 mm/slub.c:2020 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc_node+0xa2/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x28a/0x460 mm/util.c:592 kvmalloc include/linux/slab.h:716 [inline] vmemdup_user+0x26/0xe0 mm/util.c:205 setxattr_copy fs/xattr.c:573 [inline] setxattr+0x1ce/0x330 fs/xattr.c:613 path_setxattr+0x147/0x290 fs/xattr.c:636 __do_sys_lsetxattr fs/xattr.c:659 [inline] __se_sys_lsetxattr fs/xattr.c:655 [inline] __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:655 x64_sys_call+0x8b7/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190 page_owner free stack trace missing Memory state around the buggy address: ffff88811a86cd00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88811a86cd80: 00 00 00 00 00 00 00 02 fc fc fc fc fc fc fc fc >ffff88811a86ce00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811a86ce80: 00 00 00 00 00 00 00 02 fc fc fc fc fc fc fc fc ffff88811a86cf00: 00 00 00 00 00 00 00 02 fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 48 c7 c7 80 fe 0d 87 mov $0xffffffff870dfe80,%rdi 7: e8 48 52 81 00 call 0x815254 c: eb a1 jmp 0xffffffaf e: 00 00 add %al,(%rax) 10: cc int3 11: cc int3 12: 00 00 add %al,(%rax) 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: 90 nop 1e: 90 nop 1f: b8 a3 2b a8 ac mov $0xaca82ba3,%eax 24: 55 push %rbp 25: 48 89 e5 mov %rsp,%rbp 28: 41 57 push %r15 * 2a: 41 56 push %r14 <-- trapping instruction 2c: 53 push %rbx 2d: 48 89 fb mov %rdi,%rbx 30: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14 37: fc ff df 3a: 48 89 f8 mov %rdi,%rax 3d: 48 rex.W 3e: c1 .byte 0xc1 3f: e8 .byte 0xe8