================================================================== 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 ffff8881ea10b1c8 by task syz.5.774/3037 CPU: 1 PID: 3037 Comm: syz.5.774 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_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:check_kcov_mode kernel/kcov.c:153 [inline] RIP: 0010:write_comp_data kernel/kcov.c:208 [inline] RIP: 0010:__sanitizer_cov_trace_cmp4+0x17/0x80 kernel/kcov.c:248 Code: 48 ff c2 48 89 11 5d c3 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 8b 45 08 65 48 8b 15 40 0d a3 7e 65 8b 0d 45 0d a3 7e c1 00 01 1f 00 74 02 5d c3 8b 8a 00 0a 00 00 83 f9 03 75 f3 48 RSP: 0018:ffff8881e613ef58 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffffffff814fbc64 RBX: 0000000000000010 RCX: 0000000080000001 RDX: ffff8881eb000fc0 RSI: 0000000000000010 RDI: 000000000000000b RBP: ffff8881e613ef58 R08: dffffc0000000000 R09: ffff8881e613efc8 R10: ffffed103cc27e05 R11: 1ffff1103cc27df9 R12: ffff8881e613f080 R13: 1ffff1103cc27e12 R14: dffffc0000000000 R15: 000000000000000b stack_trace_consume_entry+0x74/0x250 kernel/stacktrace.c:86 arch_stack_walk+0x100/0x140 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0xaa/0xf0 kernel/stacktrace.c:123 save_stack+0x97/0x560 mm/page_owner.c:122 __set_page_owner+0x39/0x1e0 mm/page_owner.c:191 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 tlb_next_batch mm/mmu_gather.c:29 [inline] __tlb_remove_page_size+0x17b/0x300 mm/mmu_gather.c:83 __tlb_remove_page include/asm-generic/tlb.h:426 [inline] zap_pte_range mm/memory.c:1108 [inline] zap_pmd_range mm/memory.c:1222 [inline] zap_pud_range mm/memory.c:1251 [inline] zap_p4d_range mm/memory.c:1272 [inline] unmap_page_range+0xf7c/0x1b20 mm/memory.c:1293 unmap_single_vma mm/memory.c:1338 [inline] unmap_vmas+0x245/0x340 mm/memory.c:1370 exit_mmap+0x2bb/0x520 mm/mmap.c:3191 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 get_signal+0xdee/0x13d0 kernel/signal.c:2738 do_signal+0xad/0xda0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x18e/0x1f0 arch/x86/entry/common.c:194 syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x13e/0x170 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f5397a6f969 Code: Bad RIP value. RSP: 002b:00007f53960d80e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f5397c96fa8 RCX: 00007f5397a6f969 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f5397c96fa8 RBP: 00007f5397c96fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5397c96fac R13: 0000000000000000 R14: 00007ffe619e1740 R15: 00007ffe619e1828 The buggy address belongs to the page: page:ffffea0007a842c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00074eb808 ffffea0007125808 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: ffff8881ea10b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881ea10b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881ea10b180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881ea10b200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881ea10b280: 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: 1 PID: 3037 Comm: syz.5.774 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:ffff8881f6f09cf0 EFLAGS: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffff8881eb000fc0 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881ea10b1c0 RBP: ffff8881f6f09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103ede1398 R11: 1ffff1103ede1398 R12: 00000000ffffa888 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ea10b1c0 FS: 0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000005c0e000 CR4: 00000000003406a0 DR0: 0000200000000300 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:check_kcov_mode kernel/kcov.c:153 [inline] RIP: 0010:write_comp_data kernel/kcov.c:208 [inline] RIP: 0010:__sanitizer_cov_trace_cmp4+0x17/0x80 kernel/kcov.c:248 Code: 48 ff c2 48 89 11 5d c3 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 8b 45 08 65 48 8b 15 40 0d a3 7e 65 8b 0d 45 0d a3 7e c1 00 01 1f 00 74 02 5d c3 8b 8a 00 0a 00 00 83 f9 03 75 f3 48 RSP: 0018:ffff8881e613ef58 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffffffff814fbc64 RBX: 0000000000000010 RCX: 0000000080000001 RDX: ffff8881eb000fc0 RSI: 0000000000000010 RDI: 000000000000000b RBP: ffff8881e613ef58 R08: dffffc0000000000 R09: ffff8881e613efc8 R10: ffffed103cc27e05 R11: 1ffff1103cc27df9 R12: ffff8881e613f080 R13: 1ffff1103cc27e12 R14: dffffc0000000000 R15: 000000000000000b stack_trace_consume_entry+0x74/0x250 kernel/stacktrace.c:86 arch_stack_walk+0x100/0x140 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0xaa/0xf0 kernel/stacktrace.c:123 save_stack+0x97/0x560 mm/page_owner.c:122 __set_page_owner+0x39/0x1e0 mm/page_owner.c:191 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 tlb_next_batch mm/mmu_gather.c:29 [inline] __tlb_remove_page_size+0x17b/0x300 mm/mmu_gather.c:83 __tlb_remove_page include/asm-generic/tlb.h:426 [inline] zap_pte_range mm/memory.c:1108 [inline] zap_pmd_range mm/memory.c:1222 [inline] zap_pud_range mm/memory.c:1251 [inline] zap_p4d_range mm/memory.c:1272 [inline] unmap_page_range+0xf7c/0x1b20 mm/memory.c:1293 unmap_single_vma mm/memory.c:1338 [inline] unmap_vmas+0x245/0x340 mm/memory.c:1370 exit_mmap+0x2bb/0x520 mm/mmap.c:3191 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 get_signal+0xdee/0x13d0 kernel/signal.c:2738 do_signal+0xad/0xda0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x18e/0x1f0 arch/x86/entry/common.c:194 syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x13e/0x170 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f5397a6f969 Code: Bad RIP value. RSP: 002b:00007f53960d80e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f5397c96fa8 RCX: 00007f5397a6f969 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f5397c96fa8 RBP: 00007f5397c96fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5397c96fac R13: 0000000000000000 R14: 00007ffe619e1740 R15: 00007ffe619e1828 Modules linked in: CR2: 0000000000000000 ---[ end trace 1ee57b89247d551e ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09cf0 EFLAGS: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffff8881eb000fc0 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881ea10b1c0 RBP: ffff8881f6f09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103ede1398 R11: 1ffff1103ede1398 R12: 00000000ffffa888 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ea10b1c0 FS: 0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000005c0e000 CR4: 00000000003406a0 DR0: 0000200000000300 DR1: 0000200000000300 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess): 0: 48 ff c2 inc %rdx 3: 48 89 11 mov %rdx,(%rcx) 6: 5d pop %rbp 7: c3 ret 8: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) f: 00 00 00 00 13: 55 push %rbp 14: 48 89 e5 mov %rsp,%rbp 17: 48 8b 45 08 mov 0x8(%rbp),%rax 1b: 65 48 8b 15 40 0d a3 mov %gs:0x7ea30d40(%rip),%rdx # 0x7ea30d63 22: 7e 23: 65 8b 0d 45 0d a3 7e mov %gs:0x7ea30d45(%rip),%ecx # 0x7ea30d6f * 2a: f7 c1 00 01 1f 00 test $0x1f0100,%ecx <-- trapping instruction 30: 74 02 je 0x34 32: 5d pop %rbp 33: c3 ret 34: 8b 8a 00 0a 00 00 mov 0xa00(%rdx),%ecx 3a: 83 f9 03 cmp $0x3,%ecx 3d: 75 f3 jne 0x32 3f: 48 rex.W