syzbot


kernel BUG in kvm_hv_set_msr_common

Status: fixed on 2021/09/29 11:02
Reported-by: syzbot+df6655ee4555163e7df7@syzkaller.appspotmail.com
Fix commit: 41d2efaed5bd KVM: remember position in kvm->vcpus array
First crash: 1209d, last: 1179d
Fix bisection: fixed by (bisect log) :
commit 41d2efaed5bdabe675857e6ecaa324b5504fc268
Author: Radim Krฤmรกล™ <rkrcmar@redhat.com>
Date: Thu Nov 7 12:53:42 2019 +0000

  KVM: remember position in kvm->vcpus array

  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG at include/linux/kvm_host.h:LINE! kvm 1 1969d 1969d 0/28 auto-closed as invalid on 2019/10/29 15:59
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2021/09/29 00:34 3h40m bisect fix linux-4.19.y OK (1) job log
2021/08/29 23:57 36m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
------------[ cut here ]------------
kernel BUG at include/linux/kvm_host.h:560!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 13499 Comm: syz-executor.4 Not tainted 4.19.199-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kvm_vcpu_get_idx include/linux/kvm_host.h:560 [inline]
RIP: 0010:kvm_hv_set_msr arch/x86/kvm/hyperv.c:1070 [inline]
RIP: 0010:kvm_hv_set_msr_common+0x24b2/0x2b70 arch/x86/kvm/hyperv.c:1285
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 89 06 00 00 48 8b 44 24 08 45 31 ff 48 89 85 a0 4c 00 00 e9 55 dc ff ff e8 de 16 4b 00 <0f> 0b 48 89 ef e8 a4 e5 80 00 e9 d4 dd ff ff e8 9a e5 80 00 e9 9a
RSP: 0018:ffff8880b43f74d8 EFLAGS: 00010293
RAX: ffff8880993d81c0 RBX: 0000000000000000 RCX: ffffffff81174974
RDX: 0000000000000000 RSI: ffffffff81176b42 RDI: 0000000000000004
RBP: ffff8880a3190c80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 00000000841e52e2 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffed1014632190 R15: ffffc9000763b9d0
FS:  00007ff843a25700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000003387708 CR3: 00000000a5481000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvm_set_msr_common+0x44a/0x2490 arch/x86/kvm/x86.c:2631
 vmx_set_msr+0x759/0x2230 arch/x86/kvm/vmx.c:4317
 kvm_set_msr+0x2b3/0x360 arch/x86/kvm/x86.c:1348
 do_set_msr+0x94/0xe0 arch/x86/kvm/x86.c:1377
 __msr_io arch/x86/kvm/x86.c:2945 [inline]
 msr_io+0x17a/0x290 arch/x86/kvm/x86.c:2981
 kvm_arch_vcpu_ioctl+0xeb5/0x2d50 arch/x86/kvm/x86.c:3967
 kvm_vcpu_ioctl+0x891/0xe10 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2998
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4665e9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff843a25188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056c0f0 RCX: 00000000004665e9
RDX: 0000000020001a40 RSI: 000000004008ae89 RDI: 0000000000000005
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0f0
R13: 00007fffc4df6b5f R14: 00007ff843a25300 R15: 0000000000022000
Modules linked in:
---[ end trace fdb8845278ebe8e8 ]---
RIP: 0010:kvm_vcpu_get_idx include/linux/kvm_host.h:560 [inline]
RIP: 0010:kvm_hv_set_msr arch/x86/kvm/hyperv.c:1070 [inline]
RIP: 0010:kvm_hv_set_msr_common+0x24b2/0x2b70 arch/x86/kvm/hyperv.c:1285
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 89 06 00 00 48 8b 44 24 08 45 31 ff 48 89 85 a0 4c 00 00 e9 55 dc ff ff e8 de 16 4b 00 <0f> 0b 48 89 ef e8 a4 e5 80 00 e9 d4 dd ff ff e8 9a e5 80 00 e9 9a
RSP: 0018:ffff8880b43f74d8 EFLAGS: 00010293
RAX: ffff8880993d81c0 RBX: 0000000000000000 RCX: ffffffff81174974
RDX: 0000000000000000 RSI: ffffffff81176b42 RDI: 0000000000000004
RBP: ffff8880a3190c80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 00000000841e52e2 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffed1014632190 R15: ffffc9000763b9d0
FS:  00007ff843a25700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000540198 CR3: 00000000a5481000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/30 23:57 linux-4.19.y a89b48fe9308 6c236867 .config console log report syz ci2-linux-4-19 kernel BUG in kvm_hv_set_msr_common
2021/07/30 21:17 linux-4.19.y a89b48fe9308 6c236867 .config console log report info ci2-linux-4-19 kernel BUG in kvm_hv_set_msr_common
* Struck through repros no longer work on HEAD.