==================================================================
BUG: KASAN: slab-out-of-bounds in __bpf_get_stackid+0x677/0xcf0 kernel/bpf/stackmap.c:265
Write of size 8 at addr ffff888077fe3258 by task syz.7.558/10198
CPU: 1 UID: 0 PID: 10198 Comm: syz.7.558 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
__bpf_get_stackid+0x677/0xcf0 kernel/bpf/stackmap.c:265
____bpf_get_stackid_raw_tp kernel/trace/bpf_trace.c:1810 [inline]
bpf_get_stackid_raw_tp+0x196/0x210 kernel/trace/bpf_trace.c:1799
bpf_prog_b724608cae728045+0x27/0x2f
bpf_dispatcher_nop_func include/linux/bpf.h:1335 [inline]
__bpf_prog_run include/linux/filter.h:718 [inline]
bpf_prog_run include/linux/filter.h:725 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2257 [inline]
bpf_trace_run2+0x281/0x4b0 kernel/trace/bpf_trace.c:2298
__do_trace_kfree include/trace/events/kmem.h:94 [inline]
trace_kfree include/trace/events/kmem.h:94 [inline]
kfree+0x3a0/0x440 mm/slub.c:4866
ieee80211_inform_bss+0xbd9/0x10a0 net/mac80211/scan.c:160
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0xd05/0x1ac0 net/wireless/scan.c:2379
cfg80211_inform_bss_data+0x1fb/0x3b30 net/wireless/scan.c:3234
cfg80211_inform_bss_frame_data+0x3d7/0x730 net/wireless/scan.c:3325
ieee80211_bss_info_update+0x746/0x9e0 net/mac80211/scan.c:226
ieee80211_scan_rx+0x593/0xa20 net/mac80211/scan.c:355
__ieee80211_rx_handle_packet net/mac80211/rx.c:5186 [inline]
ieee80211_rx_list+0x201c/0x2a90 net/mac80211/rx.c:5423
ieee80211_rx_napi+0x1a8/0x3d0 net/mac80211/rx.c:5446
ieee80211_rx include/net/mac80211.h:5210 [inline]
ieee80211_handle_queued_frames+0xe8/0x1f0 net/mac80211/main.c:453
tasklet_action_common+0x369/0x580 kernel/softirq.c:829
handle_softirqs+0x283/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0xb0/0x150 kernel/sched/core.c:7288
Code: 24 20 f6 44 24 21 02 74 0c 90 0f 0b 48 f7 03 08 00 00 00 74 64 bf 01 00 00 00 e8 fb 88 15 f6 e8 36 e3 4c f6 fb bf 01 00 00 00 5b ab ff ff 48 c7 44 24 40 00 00 00 00 9c 8f 44 24 40 8b 44 24
RSP: 0018:ffffc9000454f340 EFLAGS: 00000286
RAX: 5213c7efedd0d100 RBX: 0000000000000000 RCX: 5213c7efedd0d100
RDX: 0000000000000007 RSI: ffffffff8d9b6a7d RDI: 0000000000000001
RBP: ffffc9000454f3f0 R08: ffffffff8fa38037 R09: 1ffffffff1f47006
R10: dffffc0000000000 R11: fffffbfff1f47007 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffff920008a9e68
irqentry_exit+0x6f/0x90 kernel/entry/common.c:197
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_is_held_type+0x137/0x190 kernel/locking/lockdep.c:5945
Code: 01 75 44 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 4c 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 05 f9 f3 26 07 <48> 3b 44 24 08 75 43 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc9000454f4b8 EFLAGS: 00000206
RAX: 5213c7efedd0d100 RBX: 0000000000000000 RCX: 5213c7efedd0d100
RDX: ffff888065f08000 RSI: ffffffff8dba5d03 RDI: ffffffff8be33300
RBP: 00000000ffffffff R08: 0000000000000000 R09: ffffffff84b1207d
R10: dffffc0000000000 R11: fffffbfff1f47007 R12: 0000000000000246
R13: ffff888065f08000 R14: ffffffff8e171328 R15: 0000000000000002
lock_is_held include/linux/lockdep.h:249 [inline]
task_css include/linux/cgroup.h:453 [inline]
blkcg_css+0xa5/0x1d0 block/blk-cgroup.c:110
blk_cgroup_congested+0xbc/0x210 block/blk-cgroup.c:2256
__folio_throttle_swaprate+0x80/0x1c0 mm/swapfile.c:3915
folio_throttle_swaprate include/linux/swap.h:653 [inline]
folio_prealloc+0x10d/0x180 mm/memory.c:1072
wp_page_copy mm/memory.c:3552 [inline]
do_wp_page+0x1231/0x5800 mm/memory.c:4013
handle_pte_fault mm/memory.c:6068 [inline]
__handle_mm_fault+0x1033/0x5440 mm/memory.c:6195
handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364
do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0010:rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:74
Code: 0a 04 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 db 83 f9 08 73 e8 eb c5 a4 c3 cc cc cc cc 48 8b 06 48 89 07 48 8d 47 08 48 83 e0 f8 48
RSP: 0018:ffffc9000454fb88 EFLAGS: 00050206
RAX: ffffffff84c7de01 RBX: 0000000000000090 RCX: 0000000000000090
RDX: 0000000000000000 RSI: ffffc9000454fc00 RDI: 0000200000000080
RBP: ffffc9000454fd30 R08: ffffc9000454fc8f R09: 1ffff920008a9f91
R10: dffffc0000000000 R11: fffff520008a9f92 R12: 0000200000000110
R13: 00007ffffffff000 R14: ffffc9000454fc00 R15: 0000200000000080
copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline]
_inline_copy_to_user include/linux/uaccess.h:197 [inline]
_copy_to_user+0x8a/0xb0 lib/usercopy.c:26
copy_to_user include/linux/uaccess.h:225 [inline]
cp_new_stat+0x391/0x4f0 fs/stat.c:506
__do_sys_newfstat fs/stat.c:559 [inline]
__se_sys_newfstat fs/stat.c:550 [inline]
__x64_sys_newfstat+0x171/0x200 fs/stat.c:550
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:0x7f521038eba9
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:00007f52111c5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000005
RAX: ffffffffffffffda RBX: 00007f52105d5fa0 RCX: 00007f521038eba9
RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000000000000008
RBP: 00007f5210411e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f52105d6038 R14: 00007f52105d5fa0 R15: 00007fff84de7cd8
Allocated by task 10199:
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]
__do_kmalloc_node mm/slub.c:4365 [inline]
__kmalloc_node_noprof+0x276/0x4e0 mm/slub.c:4371
kmalloc_node_noprof include/linux/slab.h:932 [inline]
__bpf_map_area_alloc kernel/bpf/syscall.c:393 [inline]
bpf_map_area_alloc+0x64/0x180 kernel/bpf/syscall.c:406
prealloc_elems_and_freelist+0x86/0x1d0 kernel/bpf/stackmap.c:51
stack_map_alloc+0x33f/0x4c0 kernel/bpf/stackmap.c:114
map_create+0xaa0/0x14d0 kernel/bpf/syscall.c:1480
__sys_bpf+0x60f/0x870 kernel/bpf/syscall.c:6011
__do_sys_bpf kernel/bpf/syscall.c:6139 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6137 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6137
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 ffff888077fe3000
which belongs to the cache kmalloc-cg-1k of size 1024
The buggy address is located 24 bytes to the right of
allocated 576-byte region [ffff888077fe3000, ffff888077fe3240)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77fe0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88805f8d3701
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a44b280 ffffea000190d400 dead000000000002
raw: 0000000000000000 0000000080100010 00000000f5000000 ffff88805f8d3701
head: 00fff00000000040 ffff88801a44b280 ffffea000190d400 dead000000000002
head: 0000000000000000 0000000080100010 00000000f5000000 ffff88805f8d3701
head: 00fff00000000003 ffffea0001dff801 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8426, tgid 8426 (syz-executor), ts 289397651373, free_ts 289379181354
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:2487 [inline]
allocate_slab+0x8a/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__do_kmalloc_node mm/slub.c:4364 [inline]
__kmalloc_noprof+0x305/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
__register_sysctl_table+0x72/0x1340 fs/proc/proc_sysctl.c:1379
neigh_sysctl_register+0x9a2/0xa80 net/core/neighbour.c:3887
addrconf_sysctl_register+0xb3/0x1c0 net/ipv6/addrconf.c:7365
ipv6_add_dev+0xd46/0x1370 net/ipv6/addrconf.c:460
addrconf_notify+0x794/0x1010 net/ipv6/addrconf.c:3650
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:11227
veth_newlink+0x42f/0xa50 drivers/net/veth.c:1855
rtnl_newlink_create+0x30d/0xb00 net/core/rtnetlink.c:3825
page last free pid 8415 tgid 8415 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
discard_slab mm/slub.c:2753 [inline]
__put_partials+0x156/0x1a0 mm/slub.c:3218
put_cpu_partial+0x17c/0x250 mm/slub.c:3293
__slab_free+0x2d5/0x3c0 mm/slub.c:4550
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:340
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4180 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
__kmalloc_cache_noprof+0x1be/0x3d0 mm/slub.c:4391
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
__netdev_upper_dev_link+0x3c3/0x590 net/core/dev.c:8662
netdev_upper_dev_link+0x9d/0xf0 net/core/dev.c:8703
macsec_newlink+0xaec/0x11b0 drivers/net/macsec.c:4239
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
Memory state around the buggy address:
ffff888077fe3100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888077fe3180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888077fe3200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
^
ffff888077fe3280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888077fe3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 24 20 and $0x20,%al
2: f6 44 24 21 02 testb $0x2,0x21(%rsp)
7: 74 0c je 0x15
9: 90 nop
a: 0f 0b ud2
c: 48 f7 03 08 00 00 00 testq $0x8,(%rbx)
13: 74 64 je 0x79
15: bf 01 00 00 00 mov $0x1,%edi
1a: e8 fb 88 15 f6 call 0xf615891a
1f: e8 36 e3 4c f6 call 0xf64ce35a
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 5b ab ff ff call 0xffffab8a <-- trapping instruction
2f: 48 c7 44 24 40 00 00 movq $0x0,0x40(%rsp)
36: 00 00
38: 9c pushf
39: 8f 44 24 40 pop 0x40(%rsp)
3d: 8b .byte 0x8b
3e: 44 rex.R
3f: 24 .byte 0x24