================================================================== BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0x6c9/0x920 kernel/bpf/stackmap.c:274 Write of size 32 at addr ffff888023c36910 by task syz.0.7911/27917 CPU: 0 PID: 27917 Comm: syz.0.7911 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x235/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 __bpf_get_stackid+0x6c9/0x920 kernel/bpf/stackmap.c:274 ____bpf_get_stackid_pe kernel/bpf/stackmap.c:365 [inline] bpf_get_stackid_pe+0x33f/0x400 kernel/bpf/stackmap.c:334 bpf_prog_c1fc8cdcea84755f+0x28/0x40 bpf_dispatcher_nop_func include/linux/bpf.h:1012 [inline] __bpf_prog_run include/linux/filter.h:607 [inline] bpf_prog_run include/linux/filter.h:614 [inline] bpf_overflow_handler+0x50b/0x790 kernel/events/core.c:10321 __perf_event_overflow+0x457/0x630 kernel/events/core.c:9496 perf_event_overflow kernel/events/core.c:9517 [inline] perf_swevent_hrtimer+0x472/0x630 kernel/events/core.c:10967 __run_hrtimer kernel/time/hrtimer.c:1751 [inline] __hrtimer_run_queues+0x4e7/0xc90 kernel/time/hrtimer.c:1815 hrtimer_interrupt+0x399/0x980 kernel/time/hrtimer.c:1877 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1107 [inline] __sysvec_apic_timer_interrupt+0x153/0x5a0 arch/x86/kernel/apic/apic.c:1124 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:plist_check_list+0x0/0x240 lib/plist.c:45 Code: ff 4c 89 ef e8 a1 7c b3 f7 e9 f0 fd ff ff e8 e7 4f 62 f7 0f 0b e8 e0 4f 62 f7 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <55> 41 57 41 56 41 55 41 54 53 48 83 ec 20 48 89 fd 48 bb 00 00 00 RSP: 0018:ffffc90003927b60 EFLAGS: 00000283 RAX: ffffffff8a1fdd7a RBX: ffffc90000a20948 RCX: 0000000000080000 RDX: ffffc9000e671000 RSI: 00000000000003fc RDI: ffffc90003bbfc58 RBP: dffffc0000000000 R08: ffff88801a77802b R09: 1ffff110034ef005 R10: dffffc0000000000 R11: ffffed10034ef006 R12: ffffc90003bbfc80 R13: dffffc0000000000 R14: ffffc90003bbfc50 R15: ffffc90003bbfc58 plist_check_head lib/plist.c:59 [inline] plist_del+0x56/0x3b0 lib/plist.c:114 __futex_unqueue+0xe7/0x150 kernel/futex/core.c:518 futex_wake_mark+0xe8/0x150 kernel/futex/waitwake.c:123 futex_wake+0x32b/0x4f0 kernel/futex/waitwake.c:177 do_futex+0x2e2/0x320 kernel/futex/syscalls.c:139 __do_sys_futex kernel/futex/syscalls.c:211 [inline] __se_sys_futex+0x381/0x410 kernel/futex/syscalls.c:192 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:0x7f23ea99de99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f23eb7b50e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f23eac25fa8 RCX: 00007f23ea99de99 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f23eac25fac RBP: 00007f23eac25fa0 R08: 001b9a91a6d96c16 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f23eac26038 R14: 00007fffe9756600 R15: 00007fffe97566e8 Allocated by task 27917: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node+0xb2/0x240 mm/slab_common.c:943 kmalloc_node include/linux/slab.h:589 [inline] __bpf_map_area_alloc kernel/bpf/syscall.c:328 [inline] bpf_map_area_alloc+0x47/0xe0 kernel/bpf/syscall.c:341 prealloc_elems_and_freelist+0x86/0x1c0 kernel/bpf/stackmap.c:51 stack_map_alloc+0x386/0x510 kernel/bpf/stackmap.c:117 find_and_alloc_map kernel/bpf/syscall.c:133 [inline] map_create+0x524/0xff0 kernel/bpf/syscall.c:1149 __sys_bpf+0x38b/0x780 kernel/bpf/syscall.c:5014 __do_sys_bpf kernel/bpf/syscall.c:5136 [inline] __se_sys_bpf kernel/bpf/syscall.c:5134 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5134 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 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 kvfree_call_rcu+0x103/0x890 kernel/rcu/tree.c:3405 drop_sysctl_table+0x359/0x4e0 fs/proc/proc_sysctl.c:1731 unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1769 retire_ipc_sysctls+0x5a/0x80 ipc/ipc_sysctl.c:310 free_ipc_ns ipc/namespace.c:144 [inline] free_ipc+0x91/0x1d0 ipc/namespace.c:159 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888023c36800 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 272 bytes inside of 512-byte region [ffff888023c36800, ffff888023c36a00) The buggy address belongs to the physical page: page:ffffea00008f0d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23c34 head:ffffea00008f0d00 order:2 compound_mapcount:0 compound_pincount:0 memcg:ffff88807a0f6a01 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017442dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff ffff88807a0f6a01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3645, tgid 3645 (udevd), ts 46371636337, free_ts 46264423127 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 alloc_slab_page+0x5d/0x180 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2d0 mm/slub.c:1997 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node_track_caller+0xa0/0x240 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x226/0x7d0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1303 [inline] alloc_skb_with_frags+0xa7/0x710 net/core/skbuff.c:6186 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2764 unix_dgram_sendmsg+0x5c1/0x16f0 net/unix/af_unix.c:1945 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] sock_write_iter+0x2d5/0x3e0 net/socket.c:1144 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737 slab_alloc_node mm/slub.c:3359 [inline] __kmem_cache_alloc_node+0x19d/0x270 mm/slub.c:3398 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] kernfs_fop_open+0x3ce/0xc60 fs/kernfs/file.c:690 do_dentry_open+0x7dd/0x10b0 fs/open.c:882 do_open fs/namei.c:3634 [inline] path_openat+0x2674/0x2f10 fs/namei.c:3791 do_filp_open+0x1ee/0x420 fs/namei.c:3818 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 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 Memory state around the buggy address: ffff888023c36800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023c36880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888023c36900: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023c36980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023c36a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: ff 4c 89 ef decl -0x11(%rcx,%rcx,4) 4: e8 a1 7c b3 f7 call 0xf7b37caa 9: e9 f0 fd ff ff jmp 0xfffffdfe e: e8 e7 4f 62 f7 call 0xf7624ffa 13: 0f 0b ud2 15: e8 e0 4f 62 f7 call 0xf7624ffa 1a: 0f 0b ud2 1c: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 23: 00 00 00 26: 0f 1f 40 00 nopl 0x0(%rax) * 2a: 55 push %rbp <-- trapping instruction 2b: 41 57 push %r15 2d: 41 56 push %r14 2f: 41 55 push %r13 31: 41 54 push %r12 33: 53 push %rbx 34: 48 83 ec 20 sub $0x20,%rsp 38: 48 89 fd mov %rdi,%rbp 3b: 48 rex.W 3c: bb .byte 0xbb 3d: 00 00 add %al,(%rax)