================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:814 [inline] BUG: KASAN: use-after-free in enqueue_timer+0x9e/0x2c0 kernel/time/timer.c:541 Write of size 8 at addr ffff8881bcc6b1c8 by task ksoftirqd/0/10 CPU: 0 PID: 10 Comm: ksoftirqd/0 Not tainted 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_add_head include/linux/list.h:814 [inline] enqueue_timer+0x9e/0x2c0 kernel/time/timer.c:541 __internal_add_timer kernel/time/timer.c:554 [inline] internal_add_timer+0x208/0x3e0 kernel/time/timer.c:604 __mod_timer+0x5ab/0x1150 kernel/time/timer.c:1065 mod_timer+0x1f/0x30 kernel/time/timer.c:1117 can_stat_update+0xbab/0xc40 net/can/proc.c:186 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 run_ksoftirqd+0x23/0x30 kernel/softirq.c:603 smpboot_thread_fn+0x474/0x850 kernel/smpboot.c:165 kthread+0x31e/0x3a0 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 The buggy address belongs to the page: page:ffffea0006f31ac0 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea0007879c48 ffffea00075c67c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 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 0x100cc0(GFP_USER) 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] __get_free_pages+0xe/0x30 mm/page_alloc.c:4938 poll_get_entry fs/select.c:170 [inline] __pollwait+0x12e/0x3e0 fs/select.c:225 poll_wait include/linux/poll.h:47 [inline] pipe_poll+0x7f/0x320 fs/pipe.c:561 vfs_poll include/linux/poll.h:94 [inline] do_select+0xe07/0x15c0 fs/select.c:537 core_sys_select+0x505/0x690 fs/select.c:680 do_pselect fs/select.c:762 [inline] __do_sys_pselect6 fs/select.c:787 [inline] __se_sys_pselect6+0x341/0x3a0 fs/select.c:772 __x64_sys_pselect6+0xe5/0x100 fs/select.c:772 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 mm/page_alloc.c:4962 [inline] free_pages+0x117/0x180 mm/page_alloc.c:4970 poll_freewait+0x1ba/0x220 fs/select.c:155 do_select+0x1502/0x15c0 fs/select.c:611 core_sys_select+0x505/0x690 fs/select.c:680 do_pselect fs/select.c:762 [inline] __do_sys_pselect6 fs/select.c:787 [inline] __se_sys_pselect6+0x341/0x3a0 fs/select.c:772 __x64_sys_pselect6+0xe5/0x100 fs/select.c:772 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881bcc6b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881bcc6b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881bcc6b180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881bcc6b200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881bcc6b280: 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.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: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffffffff85c1ad40 RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881bcc6b1c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffc6a0 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881bcc6b1c0 FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001f0d89000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000200000000300 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 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:default_idle+0x23/0x40 arch/x86/kernel/process.c:578 Code: 90 90 00 00 90 90 00 55 48 89 e5 e8 87 b2 f5 fd bf 01 00 00 00 89 c6 e8 bb 1c fc fc 0f 1f 44 00 00 0f 00 2d cf c2 59 00 fb f4 68 b2 f5 fd bf ff ff ff ff 89 c6 e8 9c 1c fc fc 5d c3 66 2e 0f RSP: 0018:ffffffff85c07cc0 EFLAGS: 000002c6 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffffffff85c1ad40 RCX: ffffffff85c1ad40 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffffff85c07cc0 R08: dffffc0000000000 R09: fffffbfff0b835a9 R10: fffffbfff0b835a9 R11: 1ffffffff0b835a8 R12: 0000000000000000 R13: 1ffffffff0b835a8 R14: 0000000000000000 R15: ffffffff862bb528 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:568 default_idle_call kernel/sched/idle.c:94 [inline] cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x21d/0x550 kernel/sched/idle.c:264 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:356 rest_init+0xe8/0xf0 init/main.c:707 arch_call_rest_init+0xe/0x10 init/main.c:831 start_kernel+0x678/0x73e init/main.c:1036 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:492 x86_64_start_kernel+0x60/0x63 arch/x86/kernel/head64.c:473 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 Modules linked in: CR2: 0000000000000000 ---[ end trace 012c6ea573799184 ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffffffff85c1ad40 RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881bcc6b1c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffc6a0 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881bcc6b1c0 FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001f0d89000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000200000000300 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 00 00 add %al,(%rax) 4: 90 nop 5: 90 nop 6: 00 55 48 add %dl,0x48(%rbp) 9: 89 e5 mov %esp,%ebp b: e8 87 b2 f5 fd call 0xfdf5b297 10: bf 01 00 00 00 mov $0x1,%edi 15: 89 c6 mov %eax,%esi 17: e8 bb 1c fc fc call 0xfcfc1cd7 1c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 21: 0f 00 2d cf c2 59 00 verw 0x59c2cf(%rip) # 0x59c2f7 28: fb sti 29: f4 hlt * 2a: e8 68 b2 f5 fd call 0xfdf5b297 <-- trapping instruction 2f: bf ff ff ff ff mov $0xffffffff,%edi 34: 89 c6 mov %eax,%esi 36: e8 9c 1c fc fc call 0xfcfc1cd7 3b: 5d pop %rbp 3c: c3 ret 3d: 66 data16 3e: 2e cs 3f: 0f .byte 0xf