================================================================== BUG: KFENCE: use-after-free read in kvm_fastop_exception+0xf58/0x1045 Use-after-free read at 0xffff88823bc2a020 (in kfence-#20): kvm_fastop_exception+0xf58/0x1045 d_lookup+0x72/0xd0 fs/dcache.c:2370 lookup_dcache+0x14/0xd0 fs/namei.c:1520 __lookup_hash+0x1b/0x140 fs/namei.c:1543 kern_path_locked+0x146/0x300 fs/namei.c:2567 handle_remove+0x9a/0x4fa drivers/base/devtmpfs.c:312 handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop drivers/base/devtmpfs.c:395 [inline] devtmpfsd+0x176/0x24e drivers/base/devtmpfs.c:437 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 kfence-#20: 0xffff88823bc2a000-0xffff88823bc2afff, size=4096, cache=names_cache allocated by task 22 on cpu 0 at 69.151391s: getname_kernel+0x48/0x330 fs/namei.c:226 kern_path_locked+0x6f/0x300 fs/namei.c:2558 handle_remove+0x9a/0x4fa drivers/base/devtmpfs.c:312 handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop drivers/base/devtmpfs.c:395 [inline] devtmpfsd+0x176/0x24e drivers/base/devtmpfs.c:437 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 freed by task 22 on cpu 0 at 69.151414s: putname include/linux/err.h:41 [inline] filename_parentat fs/namei.c:2547 [inline] kern_path_locked+0xa7/0x300 fs/namei.c:2558 handle_remove+0x9a/0x4fa drivers/base/devtmpfs.c:312 handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop drivers/base/devtmpfs.c:395 [inline] devtmpfsd+0x176/0x24e drivers/base/devtmpfs.c:437 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 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+0xf58/0x1045 Code: 49 d3 eb e9 c9 b2 15 f9 48 8d 0b 48 83 e1 f8 48 8b 31 8d 0b 83 e1 07 c1 e1 03 48 d3 ee e9 c5 bc 15 f9 48 8d 4d 00 48 83 e1 f8 <4c> 8b 11 8d 4d 00 83 e1 07 c1 e1 03 49 d3 ea e9 27 c5 15 f9 b8 f2 RSP: 0018:ffffc90000dcfb10 EFLAGS: 00010282 RAX: 0000003336706174 RBX: ffff88806fe884d8 RCX: ffff88823bc2a020 RDX: ffffed100dfd109c RSI: 0000000000000001 RDI: ffff88806fe884d8 RBP: ffff88823bc2a020 R08: 0000000000000000 R09: ffff88806fe884d8 R10: ffffed100dfd109b R11: 0000000000000001 R12: dffffc0000000000 R13: 0000000000000005 R14: 0000000000000005 R15: ffff88806fe884a8 FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88823bc2a020 CR3: 000000006f075000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: d_lookup+0x72/0xd0 fs/dcache.c:2370 lookup_dcache+0x14/0xd0 fs/namei.c:1520 __lookup_hash+0x1b/0x140 fs/namei.c:1543 kern_path_locked+0x146/0x300 fs/namei.c:2567 handle_remove+0x9a/0x4fa drivers/base/devtmpfs.c:312 handle drivers/base/devtmpfs.c:382 [inline] devtmpfs_work_loop drivers/base/devtmpfs.c:395 [inline] devtmpfsd+0x176/0x24e drivers/base/devtmpfs.c:437 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 ================================================================== ---------------- Code disassembly (best guess): 0: 49 d3 eb shr %cl,%r11 3: e9 c9 b2 15 f9 jmpq 0xf915b2d1 8: 48 8d 0b lea (%rbx),%rcx b: 48 83 e1 f8 and $0xfffffffffffffff8,%rcx f: 48 8b 31 mov (%rcx),%rsi 12: 8d 0b lea (%rbx),%ecx 14: 83 e1 07 and $0x7,%ecx 17: c1 e1 03 shl $0x3,%ecx 1a: 48 d3 ee shr %cl,%rsi 1d: e9 c5 bc 15 f9 jmpq 0xf915bce7 22: 48 8d 4d 00 lea 0x0(%rbp),%rcx 26: 48 83 e1 f8 and $0xfffffffffffffff8,%rcx * 2a: 4c 8b 11 mov (%rcx),%r10 <-- trapping instruction 2d: 8d 4d 00 lea 0x0(%rbp),%ecx 30: 83 e1 07 and $0x7,%ecx 33: c1 e1 03 shl $0x3,%ecx 36: 49 d3 ea shr %cl,%r10 39: e9 27 c5 15 f9 jmpq 0xf915c565 3e: b8 .byte 0xb8 3f: f2 repnz