================================================================== BUG: KASAN: vmalloc-out-of-bounds in stack_map_get_build_id_offset+0x833/0x9b0 kernel/bpf/stackmap.c:147 Write of size 4 at addr ffffc90001179ef0 by task syz.6.9315/6396 CPU: 0 PID: 6396 Comm: syz.6.9315 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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_43b50326510579ba+0x21/0x36 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:__sanitizer_cov_trace_const_cmp1+0x82/0x90 kernel/kcov.c:301 Code: 8d 52 28 4d 39 ca 77 22 89 ff 89 f6 49 ff c0 4c 89 01 48 c7 44 11 08 01 00 00 00 48 89 7c 11 10 48 89 74 11 18 48 89 44 11 20 <5d> c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc900011174f8 EFLAGS: 00000293 RAX: ffffffff81b00331 RBX: ffffea00046a6080 RCX: 0000000000000000 RDX: ffff88811c7fa880 RSI: 0000000000000000 RDI: 0000000000000002 RBP: ffffc900011174f8 R08: ffffea00046a60b3 R09: 1ffffd40008d4c16 R10: dffffc0000000000 R11: fffff940008d4c17 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8881203a5630 arch_atomic_add_negative arch/x86/include/asm/atomic.h:152 [inline] atomic_add_negative include/linux/atomic/atomic-instrumented.h:592 [inline] page_remove_file_rmap mm/rmap.c:1375 [inline] page_remove_rmap+0x1e1/0xaa0 mm/rmap.c:1440 zap_pte_range mm/memory.c:1474 [inline] zap_pmd_range mm/memory.c:1599 [inline] zap_pud_range mm/memory.c:1628 [inline] zap_p4d_range mm/memory.c:1649 [inline] unmap_page_range+0x1661/0x2360 mm/memory.c:1670 unmap_single_vma mm/memory.c:1716 [inline] unmap_vmas+0x34c/0x480 mm/memory.c:1756 exit_mmap+0x2a4/0xc10 mm/mmap.c:3380 __mmput+0x92/0x340 kernel/fork.c:1321 mmput+0x4b/0x150 kernel/fork.c:1345 copy_process+0x25fd/0x3500 kernel/fork.c:2756 kernel_clone+0x22f/0x7f0 kernel/fork.c:2904 __do_sys_clone kernel/fork.c:3047 [inline] __se_sys_clone kernel/fork.c:3031 [inline] __x64_sys_clone+0x193/0x200 kernel/fork.c:3031 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 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:0x7fcb209a9a99 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:00007fcb2182bfd8 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fcb20c36098 RCX: 00007fcb209a9a99 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000008244000 RBP: 00007fcb20a3918b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fcb20c36130 R14: 00007fcb20c36098 R15: 00007ffc06a18cb8 The buggy address belongs to a 17-page vmalloc region starting at 0xffffc90001169000 allocated at prealloc_elems_and_freelist+0x8a/0x1e0 kernel/bpf/stackmap.c:51 The buggy address belongs to the physical page: page:ffffea0004c04b40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13012d flags: 0x4000000000000000(zone=1) raw: 4000000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x506dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_ZERO|__GFP_ACCOUNT), pid 6396, tgid 6394 (syz.6.9315), ts 1217465242162, free_ts 1211691572378 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 vm_area_alloc_pages mm/vmalloc.c:-1 [inline] __vmalloc_area_node mm/vmalloc.c:3084 [inline] __vmalloc_node_range+0x8ca/0x1440 mm/vmalloc.c:3256 __bpf_map_area_alloc kernel/bpf/syscall.c:334 [inline] bpf_map_area_alloc+0xd7/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:4989 __do_sys_bpf kernel/bpf/syscall.c:5111 [inline] __se_sys_bpf kernel/bpf/syscall.c:5109 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5109 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 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 kasan_depopulate_vmalloc_pte+0x6b/0x90 mm/kasan/shadow.c:375 apply_to_pte_range mm/memory.c:2690 [inline] apply_to_pmd_range mm/memory.c:2734 [inline] apply_to_pud_range mm/memory.c:2770 [inline] apply_to_p4d_range mm/memory.c:2806 [inline] __apply_to_page_range+0x8db/0xc80 mm/memory.c:2842 apply_to_existing_page_range+0x38/0x50 mm/memory.c:2875 kasan_release_vmalloc+0x97/0xb0 mm/kasan/shadow.c:492 __purge_vmap_area_lazy+0xf09/0x1870 mm/vmalloc.c:1791 drain_vmap_area_work+0x3e/0xd0 mm/vmalloc.c:1820 process_one_work+0x717/0xc30 kernel/workqueue.c:2302 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffffc90001179d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001179e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90001179e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 ^ ffffc90001179f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90001179f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== BUG: unable to handle page fault for address: ffffc9000117a008 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 100000067 P4D 100000067 PUD 100160067 PMD 1222cd067 PTE 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6396 Comm: syz.6.9315 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 RIP: 0010:stack_map_get_build_id_offset+0x75b/0x9b0 kernel/bpf/stackmap.c:148 Code: e8 5a a4 22 00 48 ba 00 00 00 00 00 fc ff df 4d 8b 75 00 49 8d 7c 24 18 48 89 f8 48 c1 e8 03 80 3c 10 00 74 05 e8 25 a5 22 00 <4d> 89 74 24 18 49 83 c4 04 ba 14 00 00 00 4c 89 e7 31 f6 e8 ed a6 RSP: 0018:ffffc90000007620 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000012 RCX: ffffffff8194764b RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc9000117a008 RBP: ffffc90000007720 R08: ffffc90001179fe7 R09: ffffc90001179fd4 R10: dffffc0000000000 R11: fffff5200022f3fa R12: ffffc90001179ff0 R13: ffff888117d44908 R14: ffffffff81005090 R15: 0000000000000012 FS: 00007fcb2182c6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc9000117a008 CR3: 0000000165f54000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: __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_43b50326510579ba+0x21/0x36 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+0x53/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:variable_ffs arch/x86/include/asm/bitops.h:319 [inline] RIP: 0010:handle_softirqs+0x14a/0x5f0 kernel/softirq.c:630 Code: 85 e8 8a 5e b8 03 65 66 89 1d 82 13 c0 7e 48 c7 c7 40 0d 69 85 e8 76 5e b8 03 65 44 89 3d 86 0f bf 7e fb 49 c7 c5 c0 a0 00 87 <44> 89 7d b4 b8 ff ff ff ff 0f bc 45 b4 89 c3 ff c3 0f 84 a2 02 00 RSP: 0018:ffffc90000007f30 EFLAGS: 00000286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 2de017ebb7e02e00 RDX: 1ffffffff0f6ea00 RSI: ffffffff85690d40 RDI: ffffffff85ca7ea0 RBP: ffffc90000007fc0 R08: ffffffff87b75008 R09: ffffffff87b75018 R10: ffffffff87b75003 R11: 1ffffffff0f6ea00 R12: ffff88811c7fa880 R13: ffffffff8700a0c0 R14: ffff88811c7fa8ac R15: 0000000000000282 __do_softirq kernel/softirq.c:680 [inline] invoke_softirq kernel/softirq.c:497 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729 irq_exit_rcu+0x9/0x10 kernel/softirq.c:741 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:__sanitizer_cov_trace_const_cmp1+0x82/0x90 kernel/kcov.c:301 Code: 8d 52 28 4d 39 ca 77 22 89 ff 89 f6 49 ff c0 4c 89 01 48 c7 44 11 08 01 00 00 00 48 89 7c 11 10 48 89 74 11 18 48 89 44 11 20 <5d> c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc900011174f8 EFLAGS: 00000293 RAX: ffffffff81b00331 RBX: ffffea00046a6080 RCX: 0000000000000000 RDX: ffff88811c7fa880 RSI: 0000000000000000 RDI: 0000000000000002 RBP: ffffc900011174f8 R08: ffffea00046a60b3 R09: 1ffffd40008d4c16 R10: dffffc0000000000 R11: fffff940008d4c17 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8881203a5630 arch_atomic_add_negative arch/x86/include/asm/atomic.h:152 [inline] atomic_add_negative include/linux/atomic/atomic-instrumented.h:592 [inline] page_remove_file_rmap mm/rmap.c:1375 [inline] page_remove_rmap+0x1e1/0xaa0 mm/rmap.c:1440 zap_pte_range mm/memory.c:1474 [inline] zap_pmd_range mm/memory.c:1599 [inline] zap_pud_range mm/memory.c:1628 [inline] zap_p4d_range mm/memory.c:1649 [inline] unmap_page_range+0x1661/0x2360 mm/memory.c:1670 unmap_single_vma mm/memory.c:1716 [inline] unmap_vmas+0x34c/0x480 mm/memory.c:1756 exit_mmap+0x2a4/0xc10 mm/mmap.c:3380 __mmput+0x92/0x340 kernel/fork.c:1321 mmput+0x4b/0x150 kernel/fork.c:1345 copy_process+0x25fd/0x3500 kernel/fork.c:2756 kernel_clone+0x22f/0x7f0 kernel/fork.c:2904 __do_sys_clone kernel/fork.c:3047 [inline] __se_sys_clone kernel/fork.c:3031 [inline] __x64_sys_clone+0x193/0x200 kernel/fork.c:3031 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 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:0x7fcb209a9a99 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:00007fcb2182bfd8 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fcb20c36098 RCX: 00007fcb209a9a99 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000008244000 RBP: 00007fcb20a3918b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fcb20c36130 R14: 00007fcb20c36098 R15: 00007ffc06a18cb8 Modules linked in: CR2: ffffc9000117a008 ---[ end trace 0000000000000000 ]--- RIP: 0010:stack_map_get_build_id_offset+0x75b/0x9b0 kernel/bpf/stackmap.c:148 Code: e8 5a a4 22 00 48 ba 00 00 00 00 00 fc ff df 4d 8b 75 00 49 8d 7c 24 18 48 89 f8 48 c1 e8 03 80 3c 10 00 74 05 e8 25 a5 22 00 <4d> 89 74 24 18 49 83 c4 04 ba 14 00 00 00 4c 89 e7 31 f6 e8 ed a6 RSP: 0018:ffffc90000007620 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000012 RCX: ffffffff8194764b RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc9000117a008 RBP: ffffc90000007720 R08: ffffc90001179fe7 R09: ffffc90001179fd4 R10: dffffc0000000000 R11: fffff5200022f3fa R12: ffffc90001179ff0 R13: ffff888117d44908 R14: ffffffff81005090 R15: 0000000000000012 FS: 00007fcb2182c6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc9000117a008 CR3: 0000000165f54000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess): 0: 8d 52 28 lea 0x28(%rdx),%edx 3: 4d 39 ca cmp %r9,%r10 6: 77 22 ja 0x2a 8: 89 ff mov %edi,%edi a: 89 f6 mov %esi,%esi c: 49 ff c0 inc %r8 f: 4c 89 01 mov %r8,(%rcx) 12: 48 c7 44 11 08 01 00 movq $0x1,0x8(%rcx,%rdx,1) 19: 00 00 1b: 48 89 7c 11 10 mov %rdi,0x10(%rcx,%rdx,1) 20: 48 89 74 11 18 mov %rsi,0x18(%rcx,%rdx,1) 25: 48 89 44 11 20 mov %rax,0x20(%rcx,%rdx,1) * 2a: 5d pop %rbp <-- trapping instruction 2b: c3 ret 2c: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 33: 00 00 00 36: 66 90 xchg %ax,%ax 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop