syzbot


KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick (4)

Status: auto-closed as invalid on 2021/05/18 19:52
Reported-by: syzbot+8c1a5261856a962bcc78@syzkaller.appspotmail.com
First crash: 495d, last: 495d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick (2) 2 656d 659d 0/23 auto-closed as invalid on 2020/12/05 18:11
upstream KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick (3) 1 564d 564d 0/23 auto-closed as invalid on 2021/03/08 08:59
upstream KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick 1 702d 702d 0/23 auto-closed as invalid on 2020/10/21 04:02

Sample crash report:
==================================================================
BUG: KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick

write to 0xffff8880274e8460 of 4 bytes by task 30718 on cpu 0:
 kvm_arch_vcpu_load+0x3fc/0x550 arch/x86/kvm/x86.c:4018
 kvm_sched_in+0x57/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4864
 __fire_sched_in_preempt_notifiers kernel/sched/core.c:3906 [inline]
 fire_sched_in_preempt_notifiers kernel/sched/core.c:3912 [inline]
 finish_task_switch+0x278/0x2a0 kernel/sched/core.c:4203
 context_switch kernel/sched/core.c:4325 [inline]
 __schedule+0x3c1/0x580 kernel/sched/core.c:5073
 schedule+0x7f/0xb0 kernel/sched/core.c:5152
 xfer_to_guest_mode_work kernel/entry/kvm.c:20 [inline]
 xfer_to_guest_mode_handle_work+0x87/0x170 kernel/entry/kvm.c:50
 vcpu_run+0x557/0x6a0 arch/x86/kvm/x86.c:9319
 kvm_arch_vcpu_ioctl_run+0x476/0x860 arch/x86/kvm/x86.c:9525
 kvm_vcpu_ioctl+0x562/0x8f0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3316
 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/0xae

read to 0xffff8880274e8460 of 4 bytes by task 35 on cpu 1:
 kvm_vcpu_kick+0x15/0x160 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2909
 kvm_arch_async_page_present_queued+0x43/0x50 arch/x86/kvm/x86.c:11287
 async_pf_execute+0x1d8/0x300 arch/x86/kvm/../../../virt/kvm/async_pf.c:79
 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275
 worker_thread+0x616/0xa70 kernel/workqueue.c:2421
 kthread+0x20b/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 35 Comm: kworker/1:1 Not tainted 5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events async_pf_execute
==================================================================
usb 3-1: USB disconnect, device number 23
usb 3-1: new high-speed USB device number 24 using dummy_hcd
usb 3-1: Using ep0 maxpacket: 16
usb 3-1: config 1 interface 0 altsetting 0 has 1 endpoint descriptor, different from the interface descriptor's value: 0
usb 3-1: New USB device found, idVendor=0525, idProduct=a4a8, bcdDevice= 0.40
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: ࠐ
usb 3-1: Manufacturer: Х
usb 3-1: SerialNumber: syz
usb 3-1: USB disconnect, device number 24

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/04/10 18:57 upstream d4961772226d 6a81331a .config log report info KCSAN: data-race in kvm_arch_vcpu_load / kvm_vcpu_kick