================================================================== 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 ffff8881ea817e40 by task syz.2.466/2111 CPU: 0 PID: 2111 Comm: syz.2.466 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:ffffea0007aa05c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 dead000000000122 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 2, migratetype Unmovable, gfp_mask 0x152dc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__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] kmalloc_order mm/slab_common.c:1342 [inline] kmalloc_order_trace+0x31/0x100 mm/slab_common.c:1358 kmalloc_large include/linux/slab.h:485 [inline] __kmalloc+0x162/0x2f0 mm/slub.c:3902 __kmalloc_node include/linux/slab.h:422 [inline] kmalloc_node include/linux/slab.h:599 [inline] kvmalloc_node+0x88/0xf0 mm/util.c:596 kvmalloc include/linux/mm.h:761 [inline] kvzalloc include/linux/mm.h:769 [inline] bpf_check+0xfb/0x9cf0 kernel/bpf/verifier.c:9561 bpf_prog_load+0xa5f/0xe10 kernel/bpf/syscall.c:1724 __do_sys_bpf kernel/bpf/syscall.c:2891 [inline] __se_sys_bpf+0x435/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 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_pages_ok+0x7e4/0x910 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4956 [inline] __free_pages+0x8c/0x110 mm/page_alloc.c:4962 kfree+0x1ca/0x260 mm/slub.c:4068 kvfree+0x4c/0x50 mm/util.c:625 bpf_check+0x8371/0x9cf0 kernel/bpf/verifier.c:9731 bpf_prog_load+0xa5f/0xe10 kernel/bpf/syscall.c:1724 __do_sys_bpf kernel/bpf/syscall.c:2891 [inline] __se_sys_bpf+0x435/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 Memory state around the buggy address: ffff8881ea817d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881ea817d80: ff ff ff ff 00 00 00 00 00 00 00 00 ff ff ff ff >ffff8881ea817e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881ea817e80: ff ff ff ff f1 f1 f1 f1 00 f2 f2 f2 04 f3 f3 f3 ffff8881ea817f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== PANIC: double fault, error_code: 0x0 CPU: 0 PID: 2111 Comm: syz.2.466 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:check_preemption_disabled+0x27/0x300 lib/smp_processor_id.c:13 Code: c3 66 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec 80 00 00 00 49 89 f7 49 89 fc 65 48 8b 04 25 28 00 00 00 <48> 89 44 24 60 48 c7 44 24 20 b3 8a b5 41 48 c7 44 24 28 2c 1b 3c RSP: 0018:ffff8881e95d6f80 EFLAGS: 00010082 RAX: f0a00cbb41416400 RBX: dffffc0000000000 RCX: 0000000000080000 RDX: ffffc90001948000 RSI: ffffffff84da3260 RDI: ffffffff84da3220 RBP: ffff8881e95d7040 R08: dffffc0000000000 R09: fffffbfff0c576a6 R10: fffffbfff0c576a6 R11: 1ffffffff0c576a5 R12: ffffffff84da3220 R13: ffffffff85cb57a0 R14: ffffffff85cb5818 R15: ffffffff84da3260 FS: 00007fa83a0246c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8881e95d6f78 CR3: 00000001f5c2a000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: ---------------- Code disassembly (best guess): 0: c3 ret 1: 66 90 xchg %ax,%ax 3: 55 push %rbp 4: 48 89 e5 mov %rsp,%rbp 7: 41 57 push %r15 9: 41 56 push %r14 b: 41 55 push %r13 d: 41 54 push %r12 f: 53 push %rbx 10: 48 83 e4 e0 and $0xffffffffffffffe0,%rsp 14: 48 81 ec 80 00 00 00 sub $0x80,%rsp 1b: 49 89 f7 mov %rsi,%r15 1e: 49 89 fc mov %rdi,%r12 21: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax 28: 00 00 * 2a: 48 89 44 24 60 mov %rax,0x60(%rsp) <-- trapping instruction 2f: 48 c7 44 24 20 b3 8a movq $0x41b58ab3,0x20(%rsp) 36: b5 41 38: 48 rex.W 39: c7 .byte 0xc7 3a: 44 24 28 rex.R and $0x28,%al 3d: 2c 1b sub $0x1b,%al 3f: 3c .byte 0x3c