================================================================== BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in paging32_cmpxchg_gpte arch/x86/kvm/mmu/paging_tmpl.h:181 [inline] BUG: KASAN: use-after-free in paging32_update_accessed_dirty_bits arch/x86/kvm/mmu/paging_tmpl.h:287 [inline] BUG: KASAN: use-after-free in paging32_walk_addr_generic+0x155d/0x1980 arch/x86/kvm/mmu/paging_tmpl.h:457 Write of size 4 at addr ffff888000105000 by task syz-executor.1/1796 CPU: 0 PID: 1796 Comm: syz-executor.1 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_write include/linux/instrumented.h:71 [inline] paging32_cmpxchg_gpte arch/x86/kvm/mmu/paging_tmpl.h:181 [inline] paging32_update_accessed_dirty_bits arch/x86/kvm/mmu/paging_tmpl.h:287 [inline] paging32_walk_addr_generic+0x155d/0x1980 arch/x86/kvm/mmu/paging_tmpl.h:457 paging32_walk_addr arch/x86/kvm/mmu/paging_tmpl.h:514 [inline] paging32_gva_to_gpa+0xb2/0x1d0 arch/x86/kvm/mmu/paging_tmpl.h:958 vcpu_mmio_gva_to_gpa arch/x86/kvm/x86.c:5758 [inline] emulator_read_write_onepage+0x2f3/0xa70 arch/x86/kvm/x86.c:5874 emulator_read_write+0x1c4/0x5a0 arch/x86/kvm/x86.c:5934 emulator_write_emulated arch/x86/kvm/x86.c:5971 [inline] emulator_fix_hypercall+0x132/0x190 arch/x86/kvm/x86.c:7763 em_hypercall+0x5d/0x130 arch/x86/kvm/emulate.c:3803 x86_emulate_insn+0x5e8/0x3d20 arch/x86/kvm/emulate.c:5676 x86_emulate_instruction+0x752/0x1e00 arch/x86/kvm/x86.c:7017 kvm_emulate_instruction arch/x86/kvm/x86.c:7085 [inline] handle_ud+0xa8/0x240 arch/x86/kvm/x86.c:5718 handle_exception_nmi+0xaf7/0x1270 arch/x86/kvm/vmx/vmx.c:4761 vmx_handle_exit+0x293/0x14c0 arch/x86/kvm/vmx/vmx.c:6118 vcpu_enter_guest+0x14d6/0x3b60 arch/x86/kvm/x86.c:8641 vcpu_run arch/x86/kvm/x86.c:8706 [inline] kvm_arch_vcpu_ioctl_run+0x440/0x1780 arch/x86/kvm/x86.c:8923 kvm_vcpu_ioctl+0x467/0xdf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3229 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d239 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9d0427cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000010ac0 RCX: 000000000045d239 RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000007 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffd780b10ef R14: 00007f9d0427d9c0 R15: 000000000118cf4c The buggy address belongs to the page: page:000000002be1b2b1 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105 flags: 0x7ffe0000000000() raw: 007ffe0000000000 ffffea0000004148 ffffea0000004148 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888000104f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888000104f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888000105000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888000105080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888000105100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================