================================================================== BUG: KFENCE: use-after-free read in kvm_fastop_exception+0xfdb/0x1089 Use-after-free read at 0xffff88823bd4a020 (in kfence-#164): kvm_fastop_exception+0xfdb/0x1089 d_lookup+0x32/0x70 fs/dcache.c:2370 lookup_dcache fs/namei.c:1520 [inline] __lookup_hash+0x2e/0x240 fs/namei.c:1543 kern_path_locked+0x2f2/0x490 fs/namei.c:2567 handle_remove drivers/base/devtmpfs.c:312 [inline] handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop+0x264/0x1080 drivers/base/devtmpfs.c:395 devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:437 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 kfence-#164 [0xffff88823bd4a000-0xffff88823bd4afff, size=4096, cache=names_cache] allocated by task 22: getname_kernel+0x55/0x2d0 fs/namei.c:226 kern_path_locked+0xbb/0x490 fs/namei.c:2558 handle_remove drivers/base/devtmpfs.c:312 [inline] handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop+0x264/0x1080 drivers/base/devtmpfs.c:395 devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:437 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 freed by task 22: putname fs/namei.c:270 [inline] filename_parentat fs/namei.c:2547 [inline] kern_path_locked+0x226/0x490 fs/namei.c:2558 handle_remove drivers/base/devtmpfs.c:312 [inline] handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop+0x264/0x1080 drivers/base/devtmpfs.c:395 devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:437 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 CPU: 0 PID: 22 Comm: kdevtmpfs Not tainted 5.14.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kvm_fastop_exception+0xfdb/0x1089 Code: ed e9 23 d1 be f7 49 8d 4d 00 48 83 e1 f8 48 8b 19 41 8d 4d 00 83 e1 07 c1 e1 03 48 d3 eb e9 07 e5 be f7 49 8d 0e 48 83 e1 f8 <4c> 8b 21 41 8d 0e 83 e1 07 c1 e1 03 49 d3 ec e9 cb ed be f7 49 8d RSP: 0018:ffffc90000dcfa18 EFLAGS: 00010282 RAX: 0000003475736376 RBX: 0000000000000028 RCX: ffff88823bd4a020 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff888073a57388 RBP: 0000000000000005 R08: dffffc0000000000 R09: ffffed100e74ae72 R10: ffffed100e74ae72 R11: 0000000000000000 R12: 00000000a53ad59c R13: 0000003475736376 R14: ffff88823bd4a020 R15: ffff888073a57388 FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88823bd4a020 CR3: 0000000074ffc000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: d_lookup+0x32/0x70 fs/dcache.c:2370 lookup_dcache fs/namei.c:1520 [inline] __lookup_hash+0x2e/0x240 fs/namei.c:1543 kern_path_locked+0x2f2/0x490 fs/namei.c:2567 handle_remove drivers/base/devtmpfs.c:312 [inline] handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop+0x264/0x1080 drivers/base/devtmpfs.c:395 devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:437 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 ================================================================== ---------------- Code disassembly (best guess): 0: ed in (%dx),%eax 1: e9 23 d1 be f7 jmpq 0xf7bed129 6: 49 8d 4d 00 lea 0x0(%r13),%rcx a: 48 83 e1 f8 and $0xfffffffffffffff8,%rcx e: 48 8b 19 mov (%rcx),%rbx 11: 41 8d 4d 00 lea 0x0(%r13),%ecx 15: 83 e1 07 and $0x7,%ecx 18: c1 e1 03 shl $0x3,%ecx 1b: 48 d3 eb shr %cl,%rbx 1e: e9 07 e5 be f7 jmpq 0xf7bee52a 23: 49 8d 0e lea (%r14),%rcx 26: 48 83 e1 f8 and $0xfffffffffffffff8,%rcx * 2a: 4c 8b 21 mov (%rcx),%r12 <-- trapping instruction 2d: 41 8d 0e lea (%r14),%ecx 30: 83 e1 07 and $0x7,%ecx 33: c1 e1 03 shl $0x3,%ecx 36: 49 d3 ec shr %cl,%r12 39: e9 cb ed be f7 jmpq 0xf7beee09 3e: 49 rex.WB 3f: 8d .byte 0x8d