==================================================================
BUG: KASAN: slab-out-of-bounds in stack_map_get_build_id_offset+0x833/0x9b0 kernel/bpf/stackmap.c:147
Write of size 4 at addr ffff88812f5ff510 by task syz.3.106/740
CPU: 1 PID: 740 Comm: syz.3.106 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/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
__asan_report_store4_noabort+0x17/0x20 mm/kasan/report_generic.c:355
stack_map_get_build_id_offset+0x833/0x9b0 kernel/bpf/stackmap.c:147
__bpf_get_stackid+0x5ac/0x960 kernel/bpf/stackmap.c:250
____bpf_get_stackid_pe kernel/bpf/stackmap.c:365 [inline]
bpf_get_stackid_pe+0x2ee/0x400 kernel/bpf/stackmap.c:334
bpf_prog_888c70248be4b0cb+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_event_overflow kernel/events/core.c:9469 [inline]
perf_swevent_hrtimer+0x4b4/0x540 kernel/events/core.c:10919
__run_hrtimer kernel/time/hrtimer.c:1689 [inline]
__hrtimer_run_queues+0x398/0x8a0 kernel/time/hrtimer.c:1753
hrtimer_interrupt+0x3ad/0x8c0 kernel/time/hrtimer.c:1815
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1107 [inline]
__sysvec_apic_timer_interrupt+0x11e/0x440 arch/x86/kernel/apic/apic.c:1124
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:__preempt_count_sub arch/x86/include/asm/preempt.h:85 [inline]
RIP: 0010:preempt_schedule_common+0xa2/0xf0 kernel/sched/core.c:6933
Code: 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 62 e1 b6 fc 49 89 1e bf 01 00 00 00 e8 35 e5 ff ff 65 8b 05 c6 54 02 7b <65> ff 0d bf 54 02 7b 65 48 8b 1d af 54 02 7b 48 89 df be 08 00 00
RSP: 0018:ffffc9000dca79b8 EFLAGS: 00000246
RAX: 0000000080000001 RBX: ffffffff8500184c RCX: 0000000000000000
RDX: 0000000040000000 RSI: 0000000000000000 RDI: 00000000ffffffff
RBP: ffffc9000dca79d0 R08: ffffc9000dca77bf R09: ffffc9000dca77b0
R10: 0000000000000000 R11: fffff52001b94ef8 R12: 0000000000000001
R13: 0000000000000000 R14: ffff888109acc788 R15: dffffc0000000000
preempt_schedule+0xbc/0xd0 kernel/sched/core.c:6955
preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
try_to_wake_up+0x6c6/0x1250 kernel/sched/core.c:4400
wake_up_process kernel/sched/core.c:4528 [inline]
wake_up_q+0xd8/0x1a0 kernel/sched/core.c:1032
futex_wake+0x5e9/0x8e0 kernel/futex/waitwake.c:188
do_futex+0x2bf/0x430 kernel/futex/syscalls.c:141
__do_sys_futex kernel/futex/syscalls.c:213 [inline]
__se_sys_futex+0x136/0x310 kernel/futex/syscalls.c:194
__x64_sys_futex+0xe5/0x100 kernel/futex/syscalls.c:194
x64_sys_call+0x7ec/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:203
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:0x7fb9b379e199
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:00007fb9b46ee0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007fb9b3a26098 RCX: 00007fb9b379e199
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fb9b3a2609c
RBP: 00007fb9b3a26090 R08: 000e84db59fa8356 R09: 0000000000000000
R10: 000000000000000b R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb9b3a26128 R14: 00007ffe595a07f0 R15: 00007ffe595a08d8
Allocated by task 739:
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 ffff88812f5ff400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 272 bytes inside of
512-byte region [ffff88812f5ff400, ffff88812f5ff600)
The buggy address belongs to the physical page:
page:ffffea0004bd7f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12f5fc
head:ffffea0004bd7f00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004bd8200 dead000000000002 ffff888100042f00
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
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 287, tgid 287 (syz-executor), ts 23119227577, free_ts 23119127927
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
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_track_caller+0xa1/0x1e0 mm/slab_common.c:958
kmalloc_reserve net/core/skbuff.c:449 [inline]
__alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
alloc_skb include/linux/skbuff.h:1322 [inline]
nlmsg_new include/net/netlink.h:987 [inline]
inet6_netconf_notify_devconf+0x107/0x1c0 net/ipv6/addrconf.c:586
__addrconf_sysctl_register+0x36e/0x3e0 net/ipv6/addrconf.c:7202
addrconf_sysctl_register+0x147/0x1a0 net/ipv6/addrconf.c:7239
ipv6_add_dev+0xbf5/0x1130 net/ipv6/addrconf.c:455
addrconf_notify+0x6d0/0xe30 net/ipv6/addrconf.c:3621
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1581 [inline]
free_pcp_prepare mm/page_alloc.c:1655 [inline]
free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
free_unref_page+0x93/0x530 mm/page_alloc.c:3720
free_the_page mm/page_alloc.c:863 [inline]
__free_pages+0x67/0x100 mm/page_alloc.c:6021
free_pages+0x82/0x90 mm/page_alloc.c:6032
__stack_depot_save+0x45f/0x490 lib/stackdepot.c:506
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_set_track+0x60/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+0xb4/0x1e0 mm/slab_common.c:951
kmalloc include/linux/slab.h:568 [inline]
kzalloc include/linux/slab.h:699 [inline]
new_dir fs/proc/proc_sysctl.c:973 [inline]
get_subdir fs/proc/proc_sysctl.c:1017 [inline]
__register_sysctl_table+0x947/0xe50 fs/proc/proc_sysctl.c:1379
register_net_sysctl+0x23f/0x250 net/sysctl_net.c:169
neigh_sysctl_register+0x9a0/0xa80 net/core/neighbour.c:3860
addrconf_sysctl_register+0xb3/0x1a0 net/ipv6/addrconf.c:7235
ipv6_add_dev+0xbf5/0x1130 net/ipv6/addrconf.c:455
addrconf_notify+0x6d0/0xe30 net/ipv6/addrconf.c:3621
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
Memory state around the buggy address:
ffff88812f5ff400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88812f5ff480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88812f5ff500: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88812f5ff580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812f5ff600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
Illegal XDP return value 16128 on prog (id 140) dev veth1, expect packet loss!
----------------
Code disassembly (best guess):
0: 4c 89 f0 mov %r14,%rax
3: 48 c1 e8 03 shr $0x3,%rax
7: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1)
c: 74 08 je 0x16
e: 4c 89 f7 mov %r14,%rdi
11: e8 62 e1 b6 fc call 0xfcb6e178
16: 49 89 1e mov %rbx,(%r14)
19: bf 01 00 00 00 mov $0x1,%edi
1e: e8 35 e5 ff ff call 0xffffe558
23: 65 8b 05 c6 54 02 7b mov %gs:0x7b0254c6(%rip),%eax # 0x7b0254f0
* 2a: 65 ff 0d bf 54 02 7b decl %gs:0x7b0254bf(%rip) # 0x7b0254f0 <-- trapping instruction
31: 65 48 8b 1d af 54 02 mov %gs:0x7b0254af(%rip),%rbx # 0x7b0254e8
38: 7b
39: 48 89 df mov %rbx,%rdi
3c: be .byte 0xbe
3d: 08 00 or %al,(%rax)