KASAN: slab-out-of-bounds Write in parse_build_id_buf

Status: upstream: reported syz repro on 2026/09/24 06:22
Reported-by: syzbot+8bfa474bce64d9352be5@syzkaller.appspotmail.com
First crash: 4d19h, last: 4d18h
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 KASAN: slab-out-of-bounds Write in parse_build_id_buf origin:lts-only 21 syz 1 2d18h 4d07h 0/2 upstream: reported syz repro on 2026/09/24 17:56

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in parse_build_id_buf+0x29a/0x350 lib/buildid.c:45
Write of size 20 at addr ffff88807884e8f4 by task syz.0.18/4431

CPU: 1 PID: 4431 Comm: syz.0.18 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 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
 parse_build_id_buf+0x29a/0x350 lib/buildid.c:45
 parse_build_id lib/buildid.c:72 [inline]
 get_build_id_64+0x18d/0x230 lib/buildid.c:133
 build_id_parse+0x290/0x570 lib/buildid.c:188
 stack_map_get_build_id_offset+0x380/0x9d0 kernel/bpf/stackmap.c:162
 __bpf_get_stackid+0x55d/0x920 kernel/bpf/stackmap.c:250
 ____bpf_get_stackid_pe kernel/bpf/stackmap.c:377 [inline]
 bpf_get_stackid_pe+0x2ec/0x400 kernel/bpf/stackmap.c:334
 bpf_prog_12712c88fd19bd5b+0x21/0x25
 bpf_dispatcher_nop_func include/linux/bpf.h:1012 [inline]
 __bpf_prog_run include/linux/filter.h:608 [inline]
 bpf_prog_run include/linux/filter.h:615 [inline]
 bpf_overflow_handler+0x50b/0x790 kernel/events/core.c:10331
 __perf_event_overflow+0x457/0x630 kernel/events/core.c:9506
 perf_swevent_overflow kernel/events/core.c:9589 [inline]
 perf_swevent_event+0x315/0x570 kernel/events/core.c:9640
 do_perf_sw_event kernel/events/core.c:9753 [inline]
 ___perf_sw_event+0x498/0x6d0 kernel/events/core.c:9784
 __perf_sw_event+0x135/0x260 kernel/events/core.c:9796
 perf_sw_event include/linux/perf_event.h:1254 [inline]
 do_user_addr_fault+0x497/0xb20 arch/x86/mm/fault.c:1284
 handle_page_fault arch/x86/mm/fault.c:1429 [inline]
 exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1482
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7ffdd1fe19e9
Code: 48 8b 75 d0 48 89 c2 48 85 d2 79 ad e9 b1 00 00 00 48 89 d7 4c 29 d7 48 0f af f8 31 c0 4c 39 d2 48 0f 46 f8 4c 01 cf 48 d3 ef <48> 89 7d c8 48 81 ff 00 ca 9a 3b 72 1c 31 c9 48 81 c7 00 36 65 c4
RSP: 002b:00007f2cd2449ff0 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 00007ffdd1fdd0b0 RCX: 0000000000000018
RDX: 000000350d76265a RSI: 00007f2cd244a0b0 RDI: 000000000b7ccb4d
RBP: 00007f2cd244a030 R08: 000000000000005f R09: 000af9294926171c
R10: 000000350c548ec8 R11: 00000000000043b2 R12: 0000000000000010
R13: 00007f2cd1826038 R14: 00007ffdd1fdd080 R15: 00000000000043b2
 </TASK>

Allocated by task 4431:
 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

The buggy address belongs to the object at ffff88807884e800
 which belongs to the cache kmalloc-cg-256 of size 256
The buggy address is located 244 bytes inside of
 256-byte region [ffff88807884e800, ffff88807884e900)

The buggy address belongs to the physical page:
page:ffffea0001e21380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7884e
head:ffffea0001e21380 order:1 compound_mapcount:0 compound_pincount:0
memcg:ffff88807929ad01
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888017442c80
raw: 0000000000000000 0000000080100010 00000001ffffffff ffff88807929ad01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4377, tgid 4377 (syz-executor), ts 87971900600, free_ts 87941136786
 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+0xa3/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 __register_sysctl_table+0xee/0xed0 fs/proc/proc_sysctl.c:1345
 ipv6_sysctl_net_init+0x3b6/0x490 net/ipv6/sysctl_net_ipv6.c:288
 ops_init+0x360/0x5e0 net/core/net_namespace.c:138
 setup_net+0x4f2/0xbd0 net/core/net_namespace.c:336
 copy_net_ns+0x33e/0x5b0 net/core/net_namespace.c:508
 create_new_namespaces+0x3ce/0x700 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0x116/0x160 kernel/nsproxy.c:226
 ksys_unshare+0x4f6/0x8e0 kernel/fork.c:3285
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]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc+0x18b/0x2f0 mm/slub.c:3383
 mt_alloc_one lib/maple_tree.c:154 [inline]
 mas_alloc_nodes+0x2ec/0x880 lib/maple_tree.c:1279
 mas_node_count_gfp lib/maple_tree.c:1361 [inline]
 mas_preallocate+0x162/0x3b0 lib/maple_tree.c:5809
 __vma_adjust+0x2ff/0x1d00 mm/mmap.c:724
 vma_adjust include/linux/mm.h:2810 [inline]
 shift_arg_pages fs/exec.c:705 [inline]
 setup_arg_pages+0x81f/0xbe0 fs/exec.c:835
 load_elf_binary+0xbf8/0x2820 fs/binfmt_elf.c:1046
 search_binary_handler fs/exec.c:1764 [inline]
 exec_binprm fs/exec.c:1805 [inline]
 bprm_execve+0xaf7/0x17e0 fs/exec.c:1874
 do_execveat_common+0x501/0x6b0 fs/exec.c:1979
 do_execve fs/exec.c:2053 [inline]
 __do_sys_execve fs/exec.c:2129 [inline]
 __se_sys_execve fs/exec.c:2124 [inline]
 __x64_sys_execve+0x8e/0xa0 fs/exec.c:2124
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76

Memory state around the buggy address:
 ffff88807884e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88807884e800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807884e880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
                                                             ^
 ffff88807884e900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88807884e980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/24 07:13 linux-6.1.y 1a8763b93150 0281b448 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf KASAN: slab-out-of-bounds Write in parse_build_id_buf
2026/09/24 06:21 linux-6.1.y 1a8763b93150 0281b448 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf KASAN: slab-out-of-bounds Write in parse_build_id_buf
* Struck through repros no longer work on HEAD.