================================================================== 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 ffff8881dfdc71c8 by task kworker/0:33/7476 CPU: 0 PID: 7476 Comm: kworker/0:33 Tainted: G W 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: events bpf_prog_free_deferred 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:bytes_is_nonzero mm/kasan/generic.c:91 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:108 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:134 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:165 [inline] RIP: 0010:check_memory_region_inline mm/kasan/generic.c:181 [inline] RIP: 0010:check_memory_region+0x73/0x280 mm/kasan/generic.c:191 Code: 5c 37 ff 48 c1 eb 03 4e 8d 14 3b 4d 89 d6 4d 29 ce 49 83 fe 10 7f 26 4d 85 f6 0f 84 39 01 00 00 48 f7 d3 4c 01 db 41 80 39 00 <0f> 85 c2 01 00 00 49 ff c1 48 ff c3 75 ee e9 1c 01 00 00 44 89 cb RSP: 0018:ffff8881e70976c0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff8881de94af01 RBX: fffffffffffffff4 RCX: ffffffff812daac4 RDX: 0000000000000001 RSI: 0000000000000060 RDI: ffff8881e7097788 RBP: ffff8881e70976d8 R08: dffffc0000000000 R09: ffffed103ce12ef1 R10: ffffed103ce12efd R11: 1ffff1103ce12ef1 R12: 0000000000000000 R13: 1ffff1103ce12f04 R14: 000000000000000c R15: dffffc0000000001 memset+0x23/0x40 mm/kasan/common.c:106 __unwind_start+0x34/0x3a0 arch/x86/kernel/unwind_frame.c:371 unwind_start arch/x86/include/asm/unwind.h:60 [inline] arch_stack_walk+0xd8/0x140 arch/x86/kernel/stacktrace.c:24 stack_trace_save+0xaa/0xf0 kernel/stacktrace.c:123 save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kfree+0xbe/0x260 mm/slub.c:4071 kvfree+0x4c/0x50 mm/util.c:625 __vunmap+0x801/0x8a0 mm/vmalloc.c:2264 __vfree mm/vmalloc.c:2308 [inline] vfree+0x61/0x90 mm/vmalloc.c:2338 __bpf_prog_free kernel/bpf/core.c:264 [inline] bpf_prog_unlock_free include/linux/filter.h:902 [inline] bpf_jit_free+0x19a/0x1f0 kernel/bpf/core.c:873 bpf_prog_free_deferred+0x2f3/0x370 kernel/bpf/core.c:2042 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 Allocated by task 164: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 getname_flags+0xb9/0x500 fs/namei.c:141 user_path_at_empty+0x2f/0x50 fs/namei.c:2703 user_path_at include/linux/namei.h:49 [inline] vfs_statx+0x116/0x200 fs/stat.c:187 vfs_fstatat include/linux/fs.h:3389 [inline] __do_sys_newfstatat fs/stat.c:367 [inline] __se_sys_newfstatat+0xcc/0x350 fs/stat.c:361 __x64_sys_newfstatat+0x9b/0xb0 fs/stat.c:361 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 164: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10c/0x2c0 mm/slub.c:3096 putname fs/namei.c:262 [inline] filename_lookup+0x44c/0x5f0 fs/namei.c:2432 user_path_at_empty+0x43/0x50 fs/namei.c:2703 user_path_at include/linux/namei.h:49 [inline] vfs_statx+0x116/0x200 fs/stat.c:187 vfs_fstatat include/linux/fs.h:3389 [inline] __do_sys_newfstatat fs/stat.c:367 [inline] __se_sys_newfstatat+0xcc/0x350 fs/stat.c:361 __x64_sys_newfstatat+0x9b/0xb0 fs/stat.c:361 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881dfdc6600 which belongs to the cache names_cache of size 4096 The buggy address is located 3016 bytes inside of 4096-byte region [ffff8881dfdc6600, ffff8881dfdc7600) The buggy address belongs to the page: page:ffffea00077f7000 refcount:1 mapcount:0 mapping:ffff8881f5d01680 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5d01680 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL) 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_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x12c/0x270 mm/slub.c:2842 getname_flags+0xb9/0x500 fs/namei.c:141 getname+0x19/0x20 fs/namei.c:212 do_sys_open+0x26c/0x5d0 fs/open.c:1117 __do_sys_openat fs/open.c:1150 [inline] __se_sys_openat fs/open.c:1144 [inline] __x64_sys_openat+0xa2/0xb0 fs/open.c:1144 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_list+0x110/0x4c0 mm/page_alloc.c:3154 release_pages+0xa62/0xaa0 mm/swap.c:842 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:297 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+0x175/0x300 mm/mmu_gather.c:277 exit_mmap+0x2db/0x520 mm/mmap.c:3193 __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 Memory state around the buggy address: ffff8881dfdc7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881dfdc7100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881dfdc7180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881dfdc7200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881dfdc7280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 1eb1d5067 P4D 1eb1d5067 PUD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7476 Comm: kworker/0:33 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 Workqueue: events bpf_prog_free_deferred RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010206 RAX: ffffffff8150a590 RBX: 0000000000000100 RCX: ffff8881de94af40 RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881dfdc71c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffea28 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881dfdc71c0 FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001d6fec000 CR4: 00000000003406b0 DR0: 0000200000000300 DR1: 0000000000000000 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:bytes_is_nonzero mm/kasan/generic.c:91 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:108 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:134 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:165 [inline] RIP: 0010:check_memory_region_inline mm/kasan/generic.c:181 [inline] RIP: 0010:check_memory_region+0x73/0x280 mm/kasan/generic.c:191 Code: 5c 37 ff 48 c1 eb 03 4e 8d 14 3b 4d 89 d6 4d 29 ce 49 83 fe 10 7f 26 4d 85 f6 0f 84 39 01 00 00 48 f7 d3 4c 01 db 41 80 39 00 <0f> 85 c2 01 00 00 49 ff c1 48 ff c3 75 ee e9 1c 01 00 00 44 89 cb RSP: 0018:ffff8881e70976c0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff8881de94af01 RBX: fffffffffffffff4 RCX: ffffffff812daac4 RDX: 0000000000000001 RSI: 0000000000000060 RDI: ffff8881e7097788 RBP: ffff8881e70976d8 R08: dffffc0000000000 R09: ffffed103ce12ef1 R10: ffffed103ce12efd R11: 1ffff1103ce12ef1 R12: 0000000000000000 R13: 1ffff1103ce12f04 R14: 000000000000000c R15: dffffc0000000001 memset+0x23/0x40 mm/kasan/common.c:106 __unwind_start+0x34/0x3a0 arch/x86/kernel/unwind_frame.c:371 unwind_start arch/x86/include/asm/unwind.h:60 [inline] arch_stack_walk+0xd8/0x140 arch/x86/kernel/stacktrace.c:24 stack_trace_save+0xaa/0xf0 kernel/stacktrace.c:123 save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kfree+0xbe/0x260 mm/slub.c:4071 kvfree+0x4c/0x50 mm/util.c:625 __vunmap+0x801/0x8a0 mm/vmalloc.c:2264 __vfree mm/vmalloc.c:2308 [inline] vfree+0x61/0x90 mm/vmalloc.c:2338 __bpf_prog_free kernel/bpf/core.c:264 [inline] bpf_prog_unlock_free include/linux/filter.h:902 [inline] bpf_jit_free+0x19a/0x1f0 kernel/bpf/core.c:873 bpf_prog_free_deferred+0x2f3/0x370 kernel/bpf/core.c:2042 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 Modules linked in: CR2: 0000000000000000 ---[ end trace 53238f5e07417c8c ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6e09cf0 EFLAGS: 00010206 RAX: ffffffff8150a590 RBX: 0000000000000100 RCX: ffff8881de94af40 RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881dfdc71c0 RBP: ffff8881f6e09d30 R08: 0000000000000004 R09: 0000000000000003 R10: ffffed103edc1398 R11: 1ffff1103edc1398 R12: 00000000ffffea28 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881dfdc71c0 FS: 0000000000000000(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001d6fec000 CR4: 00000000003406b0 DR0: 0000200000000300 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: ff 48 c1 decl -0x3f(%rax) 3: eb 03 jmp 0x8 5: 4e 8d 14 3b lea (%rbx,%r15,1),%r10 9: 4d 89 d6 mov %r10,%r14 c: 4d 29 ce sub %r9,%r14 f: 49 83 fe 10 cmp $0x10,%r14 13: 7f 26 jg 0x3b 15: 4d 85 f6 test %r14,%r14 18: 0f 84 39 01 00 00 je 0x157 1e: 48 f7 d3 not %rbx 21: 4c 01 db add %r11,%rbx 24: 41 80 39 00 cmpb $0x0,(%r9) * 28: 0f 85 c2 01 00 00 jne 0x1f0 <-- trapping instruction 2e: 49 ff c1 inc %r9 31: 48 ff c3 inc %rbx 34: 75 ee jne 0x24 36: e9 1c 01 00 00 jmp 0x157 3b: 44 89 cb mov %r9d,%ebx