syzbot


KCSAN: data-race in kvm_set_memslot / vcpu_mmio_gva_to_gpa

Status: auto-closed as invalid on 2020/07/25 12:23
Subsystems: kvm
[Documentation on labels]
First crash: 1849d, last: 1849d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in kvm_set_memslot / vcpu_mmio_gva_to_gpa (2) kvm 1 1806d 1806d 0/29 auto-closed as invalid on 2020/09/06 22:08
upstream KCSAN: data-race in kvm_set_memslot / vcpu_mmio_gva_to_gpa (4) kvm 1 1623d 1623d 0/29 auto-closed as invalid on 2021/03/08 13:59
upstream KCSAN: data-race in kvm_set_memslot / vcpu_mmio_gva_to_gpa (3) kvm 2 1708d 1679d 0/29 auto-closed as invalid on 2020/12/21 11:51

Sample crash report:
==================================================================
BUG: KCSAN: data-race in kvm_set_memslot / vcpu_mmio_gva_to_gpa

write to 0xffff888121d29000 of 8 bytes by task 12278 on cpu 0:
 install_new_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:1092 [inline]
 kvm_set_memslot+0x866/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1168
 __kvm_set_memory_region+0x708/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1314
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1335 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1347 [inline]
 kvm_vm_ioctl+0x81d/0x17c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3639
 vfs_ioctl fs/ioctl.c:48 [inline]
 ksys_ioctl fs/ioctl.c:753 [inline]
 __do_sys_ioctl fs/ioctl.c:762 [inline]
 __se_sys_ioctl+0xc9/0x130 fs/ioctl.c:760
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:760
 do_syscall_64+0x71/0x120 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888121d29000 of 8 bytes by task 12329 on cpu 1:
 vcpu_match_mmio_gen arch/x86/kvm/x86.h:189 [inline]
 vcpu_match_mmio_gpa arch/x86/kvm/x86.h:217 [inline]
 vcpu_is_mmio_gpa arch/x86/kvm/x86.c:5680 [inline]
 vcpu_mmio_gva_to_gpa+0x2c4/0x5a0 arch/x86/kvm/x86.c:5714
 emulator_read_write_onepage+0xe7/0x490 arch/x86/kvm/x86.c:5825
 emulator_read_write+0x170/0x300 arch/x86/kvm/x86.c:5885
 emulator_read_emulated+0x37/0x40 arch/x86/kvm/x86.c:5912
 read_emulated arch/x86/kvm/emulate.c:1457 [inline]
 segmented_read arch/x86/kvm/emulate.c:1481 [inline]
 x86_emulate_insn+0x39b/0x2c60 arch/x86/kvm/emulate.c:5625
 x86_emulate_instruction+0x70d/0x2ae0 arch/x86/kvm/x86.c:6968
 kvm_mmu_page_fault+0x336/0x410 arch/x86/kvm/mmu/mmu.c:5471
 handle_ept_violation+0x232/0x5c0 arch/x86/kvm/vmx/vmx.c:5314
 vmx_handle_exit+0x554/0xb40 arch/x86/kvm/vmx/vmx.c:6093
 vcpu_enter_guest+0x189c/0x23e0 arch/x86/kvm/x86.c:8593
 vcpu_run+0x26e/0x750 arch/x86/kvm/x86.c:8658
 kvm_arch_vcpu_ioctl_run+0x38d/0x690 arch/x86/kvm/x86.c:8879
 kvm_vcpu_ioctl+0x565/0x950 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3166
 vfs_ioctl fs/ioctl.c:48 [inline]
 ksys_ioctl fs/ioctl.c:753 [inline]
 __do_sys_ioctl fs/ioctl.c:762 [inline]
 __se_sys_ioctl+0xc9/0x130 fs/ioctl.c:760
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:760
 do_syscall_64+0x71/0x120 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12329 Comm: syz-executor.1 Not tainted 5.8.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/20 12:21 upstream 672f9255a727 c655ec77 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.