================================================================== BUG: KASAN: use-after-free in user_mode arch/x86/include/asm/ptrace.h:131 [inline] BUG: KASAN: use-after-free in trace_page_fault_entries arch/x86/mm/fault.c:1516 [inline] BUG: KASAN: use-after-free in do_page_fault+0x6d/0x320 arch/x86/mm/fault.c:1528 Read of size 8 at addr ffff8881eaeaff20 by task syz.4.462/2179 CPU: 0 PID: 2179 Comm: syz.4.462 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: The buggy address belongs to the page: page:ffffea0007ababc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00076b3008 ffffea0007abab88 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+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] __vmalloc_area_node mm/vmalloc.c:-1 [inline] __vmalloc_node_range+0x36a/0x6e0 mm/vmalloc.c:2499 vmalloc_user+0x73/0x80 mm/vmalloc.c:2629 kcov_mmap+0x2b/0x120 kernel/kcov.c:450 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 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 kcov_put kernel/kcov.c:396 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:495 __fput+0x2a3/0x730 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x146/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa43/0x2660 kernel/exit.c:861 do_group_exit+0x13e/0x300 kernel/exit.c:984 __do_sys_exit_group kernel/exit.c:995 [inline] __se_sys_exit_group kernel/exit.c:993 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:993 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881eaeafe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eaeafe80: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff >ffff8881eaeaff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881eaeaff80: f1 f1 f1 f1 00 f2 f2 f2 04 f3 f3 f3 ff ff ff ff ffff8881eaeb0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== PANIC: double fault, error_code: 0x0 CPU: 0 PID: 2179 Comm: syz.4.462 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:__kasan_report+0x4/0x120 mm/kasan/report.c:485 Code: 07 49 83 c7 18 48 85 c0 75 e6 65 ff 0d 61 21 75 7e 0f 85 50 ff ff ff e8 7a db 72 ff e9 46 ff ff ff 0f 1f 44 00 00 55 48 89 e5 <41> 57 41 56 41 55 41 54 53 48 83 ec 40 65 48 8b 04 25 28 00 00 00 RSP: 0018:ffff8881ea1a8000 EFLAGS: 00010082 RAX: 75b5042076bc0800 RBX: 0000000000000082 RCX: ffffffff812deaed RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881ea1a8120 RBP: ffff8881ea1a8000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881ea1a8120 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ea1a8098 FS: 000055558949e500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8881ea1a7ff8 CR3: 00000001f5c2a000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 49 83 c7 18 add $0x18,%r15 4: 48 85 c0 test %rax,%rax 7: 75 e6 jne 0xffffffef 9: 65 ff 0d 61 21 75 7e decl %gs:0x7e752161(%rip) # 0x7e752171 10: 0f 85 50 ff ff ff jne 0xffffff66 16: e8 7a db 72 ff call 0xff72db95 1b: e9 46 ff ff ff jmp 0xffffff66 20: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 25: 55 push %rbp 26: 48 89 e5 mov %rsp,%rbp * 29: 41 57 push %r15 <-- trapping instruction 2b: 41 56 push %r14 2d: 41 55 push %r13 2f: 41 54 push %r12 31: 53 push %rbx 32: 48 83 ec 40 sub $0x40,%rsp 36: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax 3d: 00 00