==================================================================
BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:773 [inline]
BUG: KASAN: use-after-free in detach_timer kernel/time/timer.c:824 [inline]
BUG: KASAN: use-after-free in expire_timers+0x155/0x400 kernel/time/timer.c:1452
Write of size 8 at addr ffff8881c93a31c8 by task syz-fuzzer/315
CPU: 1 PID: 315 Comm: syz-fuzzer Not tainted 5.4.197-syzkaller-00006-gea07addb2369 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x18e/0x1d5 lib/dump_stack.c:118
print_address_description+0x8c/0x630 mm/kasan/report.c:384
__kasan_report+0xf6/0x130 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
__hlist_del include/linux/list.h:773 [inline]
detach_timer kernel/time/timer.c:824 [inline]
expire_timers+0x155/0x400 kernel/time/timer.c:1452
__run_timers+0x5b0/0x6b0 kernel/time/timer.c:1787
run_timer_softirq+0x46/0x80 kernel/time/timer.c:1800
__do_softirq+0x23e/0x643 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+0x113/0x440 arch/x86/kernel/apic/apic.c:1150
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831
RIP: 0033:0x41e62e
Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 49 3b 66 10 0f 86 ad 02 00 00 48 83 ec 48 <48> 89 6c 24 40 48 8d 6c 24 40 0f 1f 84 00 00 00 00 00 48 a9 07 00
RSP: 002b:000000c000ff1e30 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13
RAX: 000000c0039486c0 RBX: 000000c0039486e0 RCX: 0000000000000010
RDX: 00007fbf250148e8 RSI: 000000c000023e98 RDI: 00007fbf250148e8
RBP: 000000c000ff1f08 R08: 0000000000000036 R09: 00007fbf25853437
R10: ffffffffffffffe0 R11: 00007fbf25888fff R12: 000000c0039486e0
R13: 000000c0039486c0 R14: 000000c00617dd40 R15: 0000000000000000
The buggy address belongs to the page:
page:ffffea000724e8c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 ffffea000799aa08 ffffea000759e288 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x194/0x380 mm/page_alloc.c:2171
get_page_from_freelist+0x524/0x560 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x2ab/0x6f0 mm/page_alloc.c:4857
__vmalloc_area_node mm/vmalloc.c:2431 [inline]
__vmalloc_node_range+0x38f/0x730 mm/vmalloc.c:2499
vmalloc_user+0x70/0x80 mm/vmalloc.c:2629
kcov_mmap+0x28/0x130 kernel/kcov.c:450
call_mmap include/linux/fs.h:1981 [inline]
mmap_region+0x10d7/0x15d0 mm/mmap.c:1805
do_mmap+0x813/0xd30 mm/mmap.c:1578
do_mmap_pgoff include/linux/mm.h:2476 [inline]
vm_mmap_pgoff+0x16f/0x1f0 mm/util.c:496
ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1628
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
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+0x1a4/0x290 mm/page_alloc.c:1233
free_unref_page_prepare mm/page_alloc.c:3085 [inline]
free_unref_page mm/page_alloc.c:3134 [inline]
free_the_page mm/page_alloc.c:4917 [inline]
__free_pages+0x52/0x1e0 mm/page_alloc.c:4925
__vunmap+0x7d7/0x910 mm/vmalloc.c:2260
kcov_put kernel/kcov.c:396 [inline]
kcov_close+0x25/0x40 kernel/kcov.c:495
__fput+0x261/0x680 fs/file_table.c:281
task_work_run+0x186/0x1b0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xbe1/0x2b40 kernel/exit.c:812
do_group_exit+0x136/0x300 kernel/exit.c:910
__do_sys_exit_group kernel/exit.c:921 [inline]
__se_sys_exit_group kernel/exit.c:919 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:919
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Memory state around the buggy address:
ffff8881c93a3080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881c93a3100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881c93a3180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881c93a3200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881c93a3280: 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 1e1367067 P4D 1e1367067 PUD 1e100a067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 315 Comm: syz-fuzzer Tainted: G B 5.4.197-syzkaller-00006-gea07addb2369 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0000:ffff8881f6f09d30 EFLAGS: 00010206
RAX: ffffffff81519fb9 RBX: 0000000000000100 RCX: ffff8881edda8fc0
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881c93a31c0
RBP: ffff8881c93a31e0 R08: ffffffff81519d92 R09: ffffed103ede13a8
R10: ffffed103ede13a8 R11: 1ffff1103ede13a7 R12: 00000000ffffa2a8
R13: 1ffff1103ede92f1 R14: 0000000000000000 R15: ffff8881c93a31c0
FS: 000000c005952490(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e100e000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
call_timer_fn+0x31/0x350 kernel/time/timer.c:1418
expire_timers+0x21e/0x400 kernel/time/timer.c:1463
__run_timers+0x5b0/0x6b0 kernel/time/timer.c:1787
run_timer_softirq+0x46/0x80 kernel/time/timer.c:1800
__do_softirq+0x23e/0x643 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+0x113/0x440 arch/x86/kernel/apic/apic.c:1150
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831
RIP: 0033:0x41e62e
Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 49 3b 66 10 0f 86 ad 02 00 00 48 83 ec 48 <48> 89 6c 24 40 48 8d 6c 24 40 0f 1f 84 00 00 00 00 00 48 a9 07 00
RSP: 002b:000000c000ff1e30 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13
RAX: 000000c0039486c0 RBX: 000000c0039486e0 RCX: 0000000000000010
RDX: 00007fbf250148e8 RSI: 000000c000023e98 RDI: 00007fbf250148e8
RBP: 000000c000ff1f08 R08: 0000000000000036 R09: 00007fbf25853437
R10: ffffffffffffffe0 R11: 00007fbf25888fff R12: 000000c0039486e0
R13: 000000c0039486c0 R14: 000000c00617dd40 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000000
---[ end trace 6c2297ac8eaaf15a ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0000:ffff8881f6f09d30 EFLAGS: 00010206
RAX: ffffffff81519fb9 RBX: 0000000000000100 RCX: ffff8881edda8fc0
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8881c93a31c0
RBP: ffff8881c93a31e0 R08: ffffffff81519d92 R09: ffffed103ede13a8
R10: ffffed103ede13a8 R11: 1ffff1103ede13a7 R12: 00000000ffffa2a8
R13: 1ffff1103ede92f1 R14: 0000000000000000 R15: ffff8881c93a31c0
FS: 000000c005952490(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e100e000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400