==================================================================
BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:791 [inline]
BUG: KASAN: use-after-free in detach_timer kernel/time/timer.c:824 [inline]
BUG: KASAN: use-after-free in expire_timers kernel/time/timer.c:1482 [inline]
BUG: KASAN: use-after-free in __run_timers+0x759/0xb60 kernel/time/timer.c:1817
Write of size 8 at addr ffff8881e92af1c8 by task syz.1.248/1209
CPU: 0 PID: 1209 Comm: syz.1.248 Tainted: G W 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
__dump_stack+0x1e/0x20 lib/dump_stack.c:77
dump_stack+0x15b/0x1b8 lib/dump_stack.c:118
print_address_description+0x8d/0x4c0 mm/kasan/report.c:384
__kasan_report+0xef/0x120 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
__asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:137
__hlist_del include/linux/list.h:791 [inline]
detach_timer kernel/time/timer.c:824 [inline]
expire_timers kernel/time/timer.c:1482 [inline]
__run_timers+0x759/0xb60 kernel/time/timer.c:1817
run_timer_softirq+0x6a/0xf0 kernel/time/timer.c:1830
__do_softirq+0x236/0x660 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x197/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11d/0x490 arch/x86/kernel/apic/apic.c:1161
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:perf_event_bpf_event+0x0/0x4d0 kernel/events/core.c:8167
Code: e9 ca fd ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 37 fe ff ff 4c 89 e7 e8 3c 30 18 00 e9 2a fe ff ff 0f 1f 80 00 00 00 00 <55> 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 01
RSP: 0018:ffff8881df73fbf8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000080000000 RBX: ffff8881df73fde0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffc9000009d000
RBP: ffff8881df73fd90 R08: dffffc0000000000 R09: ffff8881e0cce058
R10: ffffed103c199c0d R11: 1ffff1103c199c0b R12: ffffc9000009d000
R13: ffff8881e0cce098 R14: 0000000000000000 R15: ffffc9000009d000
__do_sys_bpf kernel/bpf/syscall.c:2891 [inline]
__se_sys_bpf+0x435/0x570 kernel/bpf/syscall.c:2849
__x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:2849
do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f2736193969
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:00007f27347fc038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f27363bafa0 RCX: 00007f2736193969
RDX: 0000000000000048 RSI: 000020000000e000 RDI: 0000000000000005
RBP: 00007f2736215ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f27363bafa0 R15: 00007ffe6ea925c8
The buggy address belongs to the page:
page:ffffea0007a4abc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 ffffea00074ea608 ffffea0007a4ab88 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102cc2(GFP_HIGHUSER|__GFP_NOWARN)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x35e/0x370 mm/page_alloc.c:2171
get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894
__alloc_pages include/linux/gfp.h:503 [inline]
__alloc_pages_node include/linux/gfp.h:516 [inline]
alloc_pages_node include/linux/gfp.h:530 [inline]
pcpu_alloc_pages mm/percpu-vm.c:94 [inline]
pcpu_populate_chunk+0x1b6/0xce0 mm/percpu-vm.c:284
pcpu_alloc+0x8ec/0x1120 mm/percpu.c:1714
__alloc_percpu_gfp+0x25/0x30 mm/percpu.c:1783
prealloc_init+0x24b/0x810 kernel/bpf/hashtab.c:154
htab_map_alloc+0x65f/0x940 kernel/bpf/hashtab.c:385
find_and_alloc_map kernel/bpf/syscall.c:122 [inline]
map_create+0x2d8/0x980 kernel/bpf/syscall.c:573
__do_sys_bpf kernel/bpf/syscall.c:2873 [inline]
__se_sys_bpf+0x2dc/0x570 kernel/bpf/syscall.c:2849
__x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:2849
do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1176 [inline]
free_pcp_prepare mm/page_alloc.c:1233 [inline]
free_unref_page_prepare+0x2a9/0x3a0 mm/page_alloc.c:3085
free_unref_page mm/page_alloc.c:3134 [inline]
free_the_page mm/page_alloc.c:4954 [inline]
__free_pages+0xaa/0x110 mm/page_alloc.c:4962
pcpu_free_pages mm/percpu-vm.c:64 [inline]
pcpu_depopulate_chunk mm/percpu-vm.c:328 [inline]
pcpu_balance_workfn+0x8c7/0x14b0 mm/percpu.c:1865
process_one_work+0x73b/0xcc0 kernel/workqueue.c:2290
worker_thread+0xa5c/0x13b0 kernel/workqueue.c:2436
kthread+0x31e/0x3a0 kernel/kthread.c:288
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354
Memory state around the buggy address:
ffff8881e92af080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881e92af100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881e92af180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881e92af200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881e92af280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1e1a2c067 P4D 1e1a2c067 PUD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 1209 Comm: syz.1.248 Tainted: G B W 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010206
RAX: ffffffff8150a590 RBX: 0000000000000100 RCX: ffff8881d05c9f80
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881e92af1c0
RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003
R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffff99b0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881e92af1c0
FS: 00007f27347fc6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e1864000 CR4: 00000000003406b0
DR0: 0000200000000300 DR1: 0000200000000300 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000ff060a
Call Trace:
call_timer_fn+0x3c/0x380 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x81d/0xb60 kernel/time/timer.c:1817
run_timer_softirq+0x6a/0xf0 kernel/time/timer.c:1830
__do_softirq+0x236/0x660 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x197/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11d/0x490 arch/x86/kernel/apic/apic.c:1161
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:perf_event_bpf_event+0x0/0x4d0 kernel/events/core.c:8167
Code: e9 ca fd ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 37 fe ff ff 4c 89 e7 e8 3c 30 18 00 e9 2a fe ff ff 0f 1f 80 00 00 00 00 <55> 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 01
RSP: 0018:ffff8881df73fbf8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000080000000 RBX: ffff8881df73fde0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffc9000009d000
RBP: ffff8881df73fd90 R08: dffffc0000000000 R09: ffff8881e0cce058
R10: ffffed103c199c0d R11: 1ffff1103c199c0b R12: ffffc9000009d000
R13: ffff8881e0cce098 R14: 0000000000000000 R15: ffffc9000009d000
__do_sys_bpf kernel/bpf/syscall.c:2891 [inline]
__se_sys_bpf+0x435/0x570 kernel/bpf/syscall.c:2849
__x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:2849
do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f2736193969
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:00007f27347fc038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f27363bafa0 RCX: 00007f2736193969
RDX: 0000000000000048 RSI: 000020000000e000 RDI: 0000000000000005
RBP: 00007f2736215ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f27363bafa0 R15: 00007ffe6ea925c8
Modules linked in:
CR2: 0000000000000000
---[ end trace a52313861a14bca8 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010206
RAX: ffffffff8150a590 RBX: 0000000000000100 RCX: ffff8881d05c9f80
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881e92af1c0
RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003
R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffff99b0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881e92af1c0
FS: 00007f27347fc6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e1864000 CR4: 00000000003406b0
DR0: 0000200000000300 DR1: 0000200000000300 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000ff060a
----------------
Code disassembly (best guess):
0: e9 ca fd ff ff jmp 0xfffffdcf
5: 44 89 e1 mov %r12d,%ecx
8: 80 e1 07 and $0x7,%cl
b: 80 c1 03 add $0x3,%cl
e: 38 c1 cmp %al,%cl
10: 0f 8c 37 fe ff ff jl 0xfffffe4d
16: 4c 89 e7 mov %r12,%rdi
19: e8 3c 30 18 00 call 0x18305a
1e: e9 2a fe ff ff jmp 0xfffffe4d
23: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
* 2a: 55 push %rbp <-- trapping instruction
2b: 48 89 e5 mov %rsp,%rbp
2e: 41 57 push %r15
30: 41 56 push %r14
32: 41 55 push %r13
34: 41 54 push %r12
36: 53 push %rbx
37: 48 83 e4 e0 and $0xffffffffffffffe0,%rsp
3b: 48 rex.W
3c: 81 .byte 0x81
3d: ec in (%dx),%al
3e: c0 .byte 0xc0
3f: 01 .byte 0x1