================================================================== BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0x6c7/0x900 kernel/bpf/stackmap.c:271 Write of size 32 at addr ffff88805f01eb60 by task syz.1.10288/4883 CPU: 0 PID: 4883 Comm: syz.1.10288 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: 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+0x6c7/0x900 kernel/bpf/stackmap.c:271 ____bpf_get_stackid_pe kernel/bpf/stackmap.c:374 [inline] bpf_get_stackid_pe+0x2f0/0x410 kernel/bpf/stackmap.c:331 bpf_prog_620e6a2847f43590+0x33/0x48 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:10576 __perf_event_overflow+0x461/0x660 kernel/events/core.c:9712 perf_swevent_overflow kernel/events/core.c:9795 [inline] perf_swevent_event+0x319/0x570 kernel/events/core.c:9846 do_perf_sw_event kernel/events/core.c:9959 [inline] ___perf_sw_event+0x4ab/0x730 kernel/events/core.c:9990 __perf_sw_event+0x139/0x270 kernel/events/core.c:10002 perf_sw_event include/linux/perf_event.h:1442 [inline] do_user_addr_fault+0x1242/0x12d0 arch/x86/mm/fault.c:1278 handle_page_fault arch/x86/mm/fault.c:1463 [inline] exc_page_fault+0x64/0x100 arch/x86/mm/fault.c:1516 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 RIP: 0033:0x7ffcb67d2a21 Code: 48 89 c2 eb a7 4c 29 d2 48 0f ba e2 3e 0f 82 ad 00 00 00 48 bf ff ff ff ff ff ff ff 7f 48 21 fa 49 0f af d1 48 01 c2 48 d3 ea <48> 89 55 c0 31 c0 48 81 fa 00 ca 9a 3b 72 1c 31 c9 48 81 c2 00 36 RSP: 002b:00007fe469519ff0 EFLAGS: 00010203 RAX: 0018aa9e076c7c88 RBX: 00007ffcb67ce0b0 RCX: 0000000000000018 RDX: 00000000193d7e37 RSI: 00007fe46951a080 RDI: 7fffffffffffffff RBP: 00007fe46951a030 R08: 000000000000086b R09: 0000000000745adf R10: 00000454b34b4b28 R11: 0000000000064d66 R12: 0000000000000010 R13: 00007fe468826038 R14: 00007ffcb67ce080 R15: 0000000000064d66 Allocated by task 4883: 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+0xb6/0x240 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+0x32b/0x4b0 kernel/bpf/stackmap.c:114 map_create+0x877/0x12f0 kernel/bpf/syscall.c:1247 __sys_bpf+0x651/0x890 kernel/bpf/syscall.c:5459 __do_sys_bpf kernel/bpf/syscall.c:5581 [inline] __se_sys_bpf kernel/bpf/syscall.c:5579 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5579 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 kvfree_call_rcu+0xee/0x780 kernel/rcu/tree.c:3452 drop_sysctl_table+0x394/0x540 fs/proc/proc_sysctl.c:1515 unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1536 mpls_dev_sysctl_unregister+0x8b/0xc0 net/mpls/af_mpls.c:1431 mpls_dev_notify+0x533/0x7a0 net/mpls/af_mpls.c:1643 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x1037/0x1910 net/core/dev.c:11124 unregister_netdevice_many net/core/dev.c:11180 [inline] unregister_netdevice_queue+0x2e9/0x330 net/core/dev.c:11060 unregister_netdevice include/linux/netdevice.h:3137 [inline] ppp_release+0xf0/0x1f0 drivers/net/ppp/ppp_generic.c:420 __fput+0x221/0x940 fs/file_table.c:418 task_work_run+0x1d4/0x260 kernel/task_work.c:245 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2721 [inline] call_rcu+0x153/0x900 kernel/rcu/tree.c:2837 inet_free_ifa net/ipv4/devinet.c:234 [inline] inetdev_destroy net/ipv4/devinet.c:325 [inline] inetdev_event+0x666/0x1610 net/ipv4/devinet.c:1636 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 call_netdevice_notifiers_mtu net/core/dev.c:2114 [inline] dev_set_mtu_ext+0x463/0x680 net/core/dev.c:8866 do_setlink+0x842/0x3f40 net/core/rtnetlink.c:2872 __rtnl_newlink net/core/rtnetlink.c:3707 [inline] rtnl_newlink+0x1848/0x2170 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x843/0xf90 net/core/rtnetlink.c:6476 netlink_rcv_skb+0x235/0x4c0 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x7b1/0x930 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1899 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x61b/0x980 net/socket.c:2595 ___sys_sendmsg+0x2a6/0x360 net/socket.c:2649 __sys_sendmsg net/socket.c:2678 [inline] __do_sys_sendmsg net/socket.c:2687 [inline] __se_sys_sendmsg+0x1d0/0x2c0 net/socket.c:2685 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88805f01eb00 which belongs to the cache kmalloc-cg-128 of size 128 The buggy address is located 96 bytes inside of allocated 120-byte region [ffff88805f01eb00, ffff88805f01eb78) The buggy address belongs to the physical page: page:ffffea00017c0780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f01e memcg:ffff8880262e2701 anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017c4dc80 ffffea00017fcbc0 dead000000000005 raw: 0000000000000000 0000000080100010 00000001ffffffff ffff8880262e2701 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5779, tgid 5779 (syz-executor), ts 77291663319, free_ts 77280167179 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582 prep_new_page mm/page_alloc.c:1589 [inline] get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501 alloc_slab_page+0x5d/0x180 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5c/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+0x11f/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0xa7/0x240 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] __register_sysctl_table+0x71/0x1210 fs/proc/proc_sysctl.c:1373 mpls_dev_sysctl_register+0x207/0x2f0 net/mpls/af_mpls.c:1406 mpls_add_dev net/mpls/af_mpls.c:1462 [inline] mpls_dev_notify+0x357/0x7a0 net/mpls/af_mpls.c:1602 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] register_netdevice+0x1670/0x1ba0 net/core/dev.c:10351 veth_newlink+0x807/0xc70 drivers/net/veth.c:1906 rtnl_newlink_create net/core/rtnetlink.c:3521 [inline] __rtnl_newlink net/core/rtnetlink.c:3741 [inline] rtnl_newlink+0x15a0/0x2170 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x843/0xf90 net/core/rtnetlink.c:6476 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1182 [inline] free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2505 release_pages+0x208a/0x2300 mm/swap.c:1022 tlb_batch_pages_flush mm/mmu_gather.c:99 [inline] tlb_flush_mmu_free mm/mmu_gather.c:294 [inline] tlb_flush_mmu+0x379/0x510 mm/mmu_gather.c:301 tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:425 exit_mmap+0x428/0xb90 mm/mmap.c:3315 __mmput+0x118/0x3a0 kernel/fork.c:1357 exit_mm+0x23f/0x340 kernel/exit.c:570 do_exit+0x909/0x2530 kernel/exit.c:871 do_group_exit+0x22d/0x2f0 kernel/exit.c:1026 __do_sys_exit_group kernel/exit.c:1037 [inline] __se_sys_exit_group kernel/exit.c:1035 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1035 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88805f01ea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805f01ea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805f01eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ^ ffff88805f01eb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f01ec00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ==================================================================