==================================================================
BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:814 [inline]
BUG: KASAN: use-after-free in enqueue_timer+0xb7/0x300 kernel/time/timer.c:541
Write of size 8 at addr ffff8881eede31c8 by task kworker/0:6/432
CPU: 0 PID: 432 Comm: kworker/0:6 Not tainted 5.4.290-syzkaller-00017-g6b07fcd94a6a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: rcu_gp process_srcu
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x241 lib/dump_stack.c:118
print_address_description+0x8c/0x600 mm/kasan/report.c:384
__kasan_report+0xf3/0x120 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
hlist_add_head include/linux/list.h:814 [inline]
enqueue_timer+0xb7/0x300 kernel/time/timer.c:541
__internal_add_timer kernel/time/timer.c:554 [inline]
internal_add_timer+0x240/0x430 kernel/time/timer.c:604
__mod_timer+0x6f1/0x13e0 kernel/time/timer.c:1065
call_timer_fn+0x36/0x390 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x879/0xbe0 kernel/time/timer.c:1817
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11a/0x490 arch/x86/kernel/apic/apic.c:1161
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50 kernel/kcov.c:183
Code: 1f 84 00 00 00 00 00 0f 1f 00 be 0c 00 00 00 48 c7 c7 20 b1 f1 85 e8 5f e3 2f 00 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <48> 8b 04 24 65 48 8b 0d 74 42 9e 7e 65 8b 15 79 42 9e 7e f7 c2 00
RSP: 0018:ffff8881eadc7b18 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
RAX: ffff8881eb083f00 RBX: 0000003e0277d57e RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff8881eadc7bd8 R08: ffffffff8231cd01 R09: ffffed103d5b8f81
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff84fa5520
R13: 1ffff1103d5b8f68 R14: 0000000000000001 R15: ffffffff84fa5560
check_preemption_disabled+0x9f/0x320 lib/smp_processor_id.c:16
delay_tsc+0x67/0xd0 arch/x86/lib/delay.c:79
try_check_zero+0x2f2/0x360 kernel/rcu/srcutree.c:708
srcu_advance_state kernel/rcu/srcutree.c:1146 [inline]
process_srcu+0x1ab/0xc40 kernel/rcu/srcutree.c:1241
process_one_work+0x765/0xd20 kernel/workqueue.c:2290
worker_thread+0xaef/0x1470 kernel/workqueue.c:2436
kthread+0x2da/0x360 kernel/kthread.c:288
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354
The buggy address belongs to the page:
page:ffffea0007bb78c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 0000000000000000 ffffea0007bb78c8 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 2, migratetype Unmovable, gfp_mask 0x152dc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_ZERO)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x18f/0x370 mm/page_alloc.c:2171
get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893
__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]
kmalloc_order mm/slab_common.c:1342 [inline]
kmalloc_order_trace+0x2a/0x100 mm/slab_common.c:1358
__kmalloc_node include/linux/slab.h:422 [inline]
kmalloc_node include/linux/slab.h:599 [inline]
kvmalloc_node+0x7e/0xf0 mm/util.c:596
kvmalloc include/linux/mm.h:761 [inline]
kvzalloc include/linux/mm.h:769 [inline]
bpf_check+0xf4/0xb3e0 kernel/bpf/verifier.c:9561
bpf_prog_load kernel/bpf/syscall.c:1724 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2891 [inline]
__se_sys_bpf+0x8139/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 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_pages_ok+0x847/0x950 mm/page_alloc.c:1438
free_the_page mm/page_alloc.c:4955 [inline]
__free_pages+0x91/0x140 mm/page_alloc.c:4961
bpf_check+0x8aeb/0xb3e0 kernel/bpf/verifier.c:9731
bpf_prog_load kernel/bpf/syscall.c:1724 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2891 [inline]
__se_sys_bpf+0x8139/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Memory state around the buggy address:
ffff8881eede3080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881eede3100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881eede3180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881eede3200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881eede3280: 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 0 P4D 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B 5.4.290-syzkaller-00017-g6b07fcd94a6a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09d18 EFLAGS: 00010202
RAX: ffffffff8154e8ca RBX: 0000000000000101 RCX: ffffffff85e1adc0
RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881eede31c0
RBP: ffff8881f6e09ec8 R08: ffffffff8154e50e R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffb8f0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eede31c0
FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001f18ee000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0040000100000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
call_timer_fn+0x36/0x390 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x879/0xbe0 kernel/time/timer.c:1817
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11a/0x490 arch/x86/kernel/apic/apic.c:1161
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:default_idle+0x1f/0x30 arch/x86/kernel/process.c:573
Code: 90 90 90 90 90 90 90 90 90 90 90 e8 db b0 da fd bf 01 00 00 00 89 c6 e8 3f 95 d1 fc 0f 1f 44 00 00 0f 00 2d 73 a4 4d 00 fb f4 bc b0 da fd bf ff ff ff ff 89 c6 e9 20 95 d1 fc 41 57 41 56 53
RSP: 0018:ffffffff85e07d18 EFLAGS: 000002d2 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffffff85e1adc0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffffffff85e07e20 R08: ffffffff8231cd01 R09: fffffbfff0bc35b9
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff864c4d28
R13: ffffffff85e1adc0 R14: 1ffffffff0bc35b8 R15: 0000000000000000
default_idle_call kernel/sched/idle.c:94 [inline]
cpuidle_idle_call kernel/sched/idle.c:154 [inline]
do_idle+0x248/0x660 kernel/sched/idle.c:264
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:356
start_kernel+0x6d9/0x81d init/main.c:1036
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241
Modules linked in:
CR2: 0000000000000000
---[ end trace c2721911c65701d1 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09d18 EFLAGS: 00010202
RAX: ffffffff8154e8ca RBX: 0000000000000101 RCX: ffffffff85e1adc0
RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881eede31c0
RBP: ffff8881f6e09ec8 R08: ffffffff8154e50e R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffb8f0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eede31c0
FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001f18ee000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0040000100000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 84 00 test %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 00 add %al,(%rax)
6: 0f 1f 00 nopl (%rax)
9: be 0c 00 00 00 mov $0xc,%esi
e: 48 c7 c7 20 b1 f1 85 mov $0xffffffff85f1b120,%rdi
15: e8 5f e3 2f 00 call 0x2fe379
1a: c3 ret
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
* 29: 48 8b 04 24 mov (%rsp),%rax <-- trapping instruction
2d: 65 48 8b 0d 74 42 9e mov %gs:0x7e9e4274(%rip),%rcx # 0x7e9e42a9
34: 7e
35: 65 8b 15 79 42 9e 7e mov %gs:0x7e9e4279(%rip),%edx # 0x7e9e42b5
3c: f7 .byte 0xf7
3d: c2 .byte 0xc2