syzbot


KCSAN: data-race in check_mmio_spte / kvm_set_memslot

Status: auto-closed as invalid on 2020/09/14 12:48
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 799d, last: 784d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in check_mmio_spte / kvm_set_memslot (3) 3 679d 665d 0/24 auto-closed as invalid on 2020/12/28 17:11
upstream KCSAN: data-race in check_mmio_spte / kvm_set_memslot (4) 1 619d 619d 0/24 auto-closed as invalid on 2021/02/26 09:27
upstream KCSAN: data-race in check_mmio_spte / kvm_set_memslot (2) 2 736d 745d 0/24 auto-closed as invalid on 2020/11/01 14:13

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

write to 0xffff88806f614000 of 8 bytes by task 14423 on cpu 0:
 install_new_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:1147 [inline]
 kvm_set_memslot+0x866/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1223
 __kvm_set_memory_region+0x708/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1369
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1390 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1402 [inline]
 kvm_vm_ioctl+0x81d/0x17c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3703
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:739
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:739
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88806f614000 of 8 bytes by task 14418 on cpu 1:
 check_mmio_spte+0x5a/0x190 arch/x86/kvm/mmu/mmu.c:509
 handle_mmio_page_fault+0x594/0x860 arch/x86/kvm/mmu/mmu.c:3979
 kvm_mmu_page_fault+0x369/0x410 arch/x86/kvm/mmu/mmu.c:5444
 handle_ept_misconfig+0x99/0x230 arch/x86/kvm/vmx/vmx.c:5355
 vmx_handle_exit+0x56b/0xc20 arch/x86/kvm/vmx/vmx.c:6118
 vcpu_enter_guest+0x1ada/0x2660 arch/x86/kvm/x86.c:8641
 vcpu_run+0x26e/0x740 arch/x86/kvm/x86.c:8706
 kvm_arch_vcpu_ioctl_run+0x38d/0x6a0 arch/x86/kvm/x86.c:8923
 kvm_vcpu_ioctl+0x565/0x950 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+0xcb/0x140 fs/ioctl.c:739
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:739
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14418 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
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/08/10 12:42 upstream fc80c51fd4b2 7adc7b65 .config log report
ci2-upstream-kcsan-gce 2020/07/26 11:03 upstream 04300d66f0a0 51265195 .config log report
* Struck through repros no longer work on HEAD.