================================================================== 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 ffff8881ecbdb1c8 by task syz.9.1666/6267 CPU: 0 PID: 6267 Comm: syz.9.1666 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:freelist_ptr mm/slub.c:265 [inline] RIP: 0010:freelist_dereference mm/slub.c:276 [inline] RIP: 0010:get_freepointer mm/slub.c:282 [inline] RIP: 0010:get_freepointer_safe mm/slub.c:296 [inline] RIP: 0010:slab_alloc_node mm/slub.c:2795 [inline] RIP: 0010:slab_alloc mm/slub.c:2837 [inline] RIP: 0010:kmem_cache_alloc+0x9a/0x270 mm/slub.c:2842 Code: 4d 85 ff 0f 84 a4 00 00 00 48 83 78 10 00 0f 84 99 00 00 00 41 8b 45 20 49 8d 0c 07 49 8b 9d b0 01 00 00 48 0f c9 49 33 1c 07 <48> 31 cb 48 89 d1 48 83 c1 08 49 8b 7d 00 4c 89 f8 65 48 0f c7 0f RSP: 0018:ffff8881e468f830 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 00baaeea8188ffff RCX: 00baaeea8188ffff RDX: 000000000009ccc0 RSI: 000000000001f762 RDI: 000000000001f763 RBP: ffff8881e468f860 R08: dffffc0000000000 R09: ffffed103d2695e9 R10: ffffed103d2695e9 R11: 1ffff1103d2695e8 R12: ffff8881f1ccc500 R13: ffff8881f1ccc500 R14: 0000000000000a20 R15: ffff8881eaaeba00 skb_clone+0x1e9/0x380 net/core/skbuff.c:1467 ____bpf_clone_redirect net/core/filter.c:2136 [inline] bpf_clone_redirect+0xa7/0x380 net/core/filter.c:2123 bpf_prog_2658eab614f371a8+0xf23/0x1000 bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/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:0x7f5e69c77969 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:00007f5e682e0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f5e69e9efa0 RCX: 00007f5e69c77969 RDX: 0000000000000050 RSI: 0000200000001300 RDI: 000000000000000a RBP: 00007f5e69cf9ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5e69e9efa0 R15: 00007fff139b9968 The buggy address belongs to the page: page:ffffea0007b2f6c0 refcount:1 mapcount:-1024 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001fffffbff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated 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+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] __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x1f/0xc0 arch/x86/mm/pgtable.c:26 __pte_alloc+0x21/0x1c0 mm/memory.c:440 do_anonymous_page mm/memory.c:3170 [inline] handle_pte_fault mm/memory.c:4057 [inline] __handle_mm_fault mm/memory.c:4183 [inline] handle_mm_fault+0x367e/0x3930 mm/memory.c:4220 do_user_addr_fault arch/x86/mm/fault.c:1444 [inline] __do_page_fault+0x4c0/0xb20 arch/x86/mm/fault.c:1505 do_page_fault+0x37/0x320 arch/x86/mm/fault.c:1529 page_fault+0x2f/0x40 arch/x86/entry/entry_64.S:1206 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 __vunmap+0x76a/0x8a0 mm/vmalloc.c:2260 __vfree mm/vmalloc.c:2308 [inline] vfree+0x61/0x90 mm/vmalloc.c:2338 kvfree+0x3d/0x50 mm/util.c:623 __vunmap+0x801/0x8a0 mm/vmalloc.c:2264 __vfree mm/vmalloc.c:2308 [inline] vfree+0x61/0x90 mm/vmalloc.c:2338 kcov_mmap+0x8c/0x120 kernel/kcov.c:474 call_mmap include/linux/fs.h:1996 [inline] mmap_region+0x101b/0x15a0 mm/mmap.c:1812 do_mmap+0x826/0xd90 mm/mmap.c:1581 do_mmap_pgoff include/linux/mm.h:2480 [inline] vm_mmap_pgoff+0x195/0x230 mm/util.c:528 ksys_mmap_pgoff+0x16f/0x1e0 mm/mmap.c:1631 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:97 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:88 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:88 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881ecbdb080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ecbdb100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881ecbdb180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8881ecbdb200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ecbdb280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 1d6ae1067 P4D 1d6ae1067 PUD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6267 Comm: syz.9.1666 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: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffff8881e934af40 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881ecbdb1c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffcf98 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ecbdb1c0 FS: 00007f5e682e06c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001e8bd2000 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:freelist_ptr mm/slub.c:265 [inline] RIP: 0010:freelist_dereference mm/slub.c:276 [inline] RIP: 0010:get_freepointer mm/slub.c:282 [inline] RIP: 0010:get_freepointer_safe mm/slub.c:296 [inline] RIP: 0010:slab_alloc_node mm/slub.c:2795 [inline] RIP: 0010:slab_alloc mm/slub.c:2837 [inline] RIP: 0010:kmem_cache_alloc+0x9a/0x270 mm/slub.c:2842 Code: 4d 85 ff 0f 84 a4 00 00 00 48 83 78 10 00 0f 84 99 00 00 00 41 8b 45 20 49 8d 0c 07 49 8b 9d b0 01 00 00 48 0f c9 49 33 1c 07 <48> 31 cb 48 89 d1 48 83 c1 08 49 8b 7d 00 4c 89 f8 65 48 0f c7 0f RSP: 0018:ffff8881e468f830 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 00baaeea8188ffff RCX: 00baaeea8188ffff RDX: 000000000009ccc0 RSI: 000000000001f762 RDI: 000000000001f763 RBP: ffff8881e468f860 R08: dffffc0000000000 R09: ffffed103d2695e9 R10: ffffed103d2695e9 R11: 1ffff1103d2695e8 R12: ffff8881f1ccc500 R13: ffff8881f1ccc500 R14: 0000000000000a20 R15: ffff8881eaaeba00 skb_clone+0x1e9/0x380 net/core/skbuff.c:1467 ____bpf_clone_redirect net/core/filter.c:2136 [inline] bpf_clone_redirect+0xa7/0x380 net/core/filter.c:2123 bpf_prog_2658eab614f371a8+0xf23/0x1000 bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/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:0x7f5e69c77969 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:00007f5e682e0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f5e69e9efa0 RCX: 00007f5e69c77969 RDX: 0000000000000050 RSI: 0000200000001300 RDI: 000000000000000a RBP: 00007f5e69cf9ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5e69e9efa0 R15: 00007fff139b9968 Modules linked in: CR2: 0000000000000000 ---[ end trace 390e40767d02f3d5 ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010202 RAX: ffffffff8150a590 RBX: 0000000000000101 RCX: ffff8881e934af40 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881ecbdb1c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffcf98 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ecbdb1c0 FS: 00007f5e682e06c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001e8bd2000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000200000000300 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess): 0: 4d 85 ff test %r15,%r15 3: 0f 84 a4 00 00 00 je 0xad 9: 48 83 78 10 00 cmpq $0x0,0x10(%rax) e: 0f 84 99 00 00 00 je 0xad 14: 41 8b 45 20 mov 0x20(%r13),%eax 18: 49 8d 0c 07 lea (%r15,%rax,1),%rcx 1c: 49 8b 9d b0 01 00 00 mov 0x1b0(%r13),%rbx 23: 48 0f c9 bswap %rcx 26: 49 33 1c 07 xor (%r15,%rax,1),%rbx * 2a: 48 31 cb xor %rcx,%rbx <-- trapping instruction 2d: 48 89 d1 mov %rdx,%rcx 30: 48 83 c1 08 add $0x8,%rcx 34: 49 8b 7d 00 mov 0x0(%r13),%rdi 38: 4c 89 f8 mov %r15,%rax 3b: 65 48 0f c7 0f cmpxchg16b %gs:(%rdi)