================================================================== 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+0x7be/0xbe0 kernel/time/timer.c:1817 Write of size 8 at addr ffff8881eb2831c8 by task syz-executor.1/2339 CPU: 1 PID: 2339 Comm: syz-executor.1 Not tainted 5.4.274-syzkaller-00001-g4433e72c494f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 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_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+0x7be/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:538 [inline] smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 RIP: 0010:__sanitizer_cov_trace_pc+0x27/0x50 kernel/kcov.c:190 Code: 90 90 90 48 8b 04 24 65 48 8b 0d 54 51 9e 7e 65 8b 15 59 51 9e 7e f7 c2 00 01 1f 00 74 01 c3 8b 91 00 0a 00 00 83 fa 02 75 f4 <48> 8b 91 08 0a 00 00 48 8b 32 48 8d 7e 01 8b 89 04 0a 00 00 48 39 RSP: 0018:ffff8881e0f4eed8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffffffff817125e0 RBX: ffff8881e1a82000 RCX: ffff8881e42f1f80 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8881e0f4f090 R08: ffffffff8171257c R09: ffffed103c1c904d R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881e0e48000 R13: 00000000000003a8 R14: dffffc0000000000 R15: 0000000000000000 print_verifier_state+0x180/0x1bd0 kernel/bpf/verifier.c:444 do_check+0x2cd0/0x9820 kernel/bpf/verifier.c:7869 bpf_check+0x2169/0xb340 kernel/bpf/verifier.c:9637 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 RIP: 0033:0x7f0c113c3ea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0c1073e0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f0c114faf80 RCX: 00007f0c113c3ea9 RDX: 0000000000000080 RSI: 0000000020003480 RDI: 0000000000000005 RBP: 00007f0c11432ff4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f0c114faf80 R15: 00007ffc5e3e79b8 The buggy address belongs to the page: page:ffffea0007aca0c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00074fbf48 ffffea0007ae6308 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 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT) 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] __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x1b/0xb0 arch/x86/mm/pgtable.c:26 __pte_alloc+0x1d/0x1c0 mm/memory.c:440 copy_pte_range mm/memory.c:830 [inline] copy_pmd_range mm/memory.c:906 [inline] copy_pud_range mm/memory.c:940 [inline] copy_p4d_range mm/memory.c:962 [inline] copy_page_range+0x1c24/0x26f0 mm/memory.c:1024 dup_mmap kernel/fork.c:608 [inline] dup_mm kernel/fork.c:1379 [inline] copy_mm+0xb23/0x10d0 kernel/fork.c:1435 copy_process+0x1291/0x3230 kernel/fork.c:2052 _do_fork+0x197/0x900 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2538 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_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x297/0x380 mm/page_alloc.c:3085 free_unref_page_list+0x10a/0x590 mm/page_alloc.c:3154 release_pages+0xad8/0xb20 mm/swap.c:842 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:189 [inline] tlb_flush_mmu mm/mmu_gather.c:196 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:277 exit_mmap+0x2dc/0x520 mm/mmap.c:3193 __mmput+0x8e/0x2c0 kernel/fork.c:1101 exit_mm kernel/exit.c:536 [inline] do_exit+0xc08/0x2bc0 kernel/exit.c:846 do_group_exit+0x138/0x300 kernel/exit.c:982 get_signal+0xdb1/0x1440 kernel/signal.c:2735 do_signal+0xb0/0x11f0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc0/0x1a0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x199/0x200 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881eb283080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eb283100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881eb283180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881eb283200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eb283280: 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 1e2495067 P4D 1e2495067 PUD 1e20b0067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 1 PID: 2339 Comm: syz-executor.1 Tainted: G B 5.4.274-syzkaller-00001-g4433e72c494f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010206 RAX: ffffffff8154d7aa RBX: 0000000000000100 RCX: ffff8881e42f1f80 RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881eb2831c0 RBP: ffff8881f6f09ec8 R08: ffffffff8154d3ee R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffaae0 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eb2831c0 FS: 00007f0c1073e6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ebcad000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 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:538 [inline] smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 RIP: 0010:__sanitizer_cov_trace_pc+0x27/0x50 kernel/kcov.c:190 Code: 90 90 90 48 8b 04 24 65 48 8b 0d 54 51 9e 7e 65 8b 15 59 51 9e 7e f7 c2 00 01 1f 00 74 01 c3 8b 91 00 0a 00 00 83 fa 02 75 f4 <48> 8b 91 08 0a 00 00 48 8b 32 48 8d 7e 01 8b 89 04 0a 00 00 48 39 RSP: 0018:ffff8881e0f4eed8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffffffff817125e0 RBX: ffff8881e1a82000 RCX: ffff8881e42f1f80 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8881e0f4f090 R08: ffffffff8171257c R09: ffffed103c1c904d R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881e0e48000 R13: 00000000000003a8 R14: dffffc0000000000 R15: 0000000000000000 print_verifier_state+0x180/0x1bd0 kernel/bpf/verifier.c:444 do_check+0x2cd0/0x9820 kernel/bpf/verifier.c:7869 bpf_check+0x2169/0xb340 kernel/bpf/verifier.c:9637 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 RIP: 0033:0x7f0c113c3ea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0c1073e0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f0c114faf80 RCX: 00007f0c113c3ea9 RDX: 0000000000000080 RSI: 0000000020003480 RDI: 0000000000000005 RBP: 00007f0c11432ff4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f0c114faf80 R15: 00007ffc5e3e79b8 Modules linked in: CR2: 0000000000000000 ---[ end trace d5dd050285845ce2 ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010206 RAX: ffffffff8154d7aa RBX: 0000000000000100 RCX: ffff8881e42f1f80 RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881eb2831c0 RBP: ffff8881f6f09ec8 R08: ffffffff8154d3ee R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffaae0 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eb2831c0 FS: 00007f0c1073e6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ebcad000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 48 8b 04 24 mov (%rsp),%rax 7: 65 48 8b 0d 54 51 9e mov %gs:0x7e9e5154(%rip),%rcx # 0x7e9e5163 e: 7e f: 65 8b 15 59 51 9e 7e mov %gs:0x7e9e5159(%rip),%edx # 0x7e9e516f 16: f7 c2 00 01 1f 00 test $0x1f0100,%edx 1c: 74 01 je 0x1f 1e: c3 ret 1f: 8b 91 00 0a 00 00 mov 0xa00(%rcx),%edx 25: 83 fa 02 cmp $0x2,%edx 28: 75 f4 jne 0x1e * 2a: 48 8b 91 08 0a 00 00 mov 0xa08(%rcx),%rdx <-- trapping instruction 31: 48 8b 32 mov (%rdx),%rsi 34: 48 8d 7e 01 lea 0x1(%rsi),%rdi 38: 8b 89 04 0a 00 00 mov 0xa04(%rcx),%ecx 3e: 48 rex.W 3f: 39 .byte 0x39