syzbot


kernel BUG in kvm_read_guest_offset_cached

Status: fixed on 2022/03/08 16:11
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+7b7db8bb4db6fd5e157b@syzkaller.appspotmail.com
Fix commit: 8503fea6761d KVM: VMX: do not use uninitialized gfn_to_hva_cache
First crash: 1059d, last: 1049d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] kernel BUG in kvm_read_guest_offset_cached 2 (3) 2021/11/24 11:25
[PATCH] KVM: VMX: do not use uninitialized gfn_to_hva_cache 2 (2) 2021/11/23 09:26
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 kernel BUG in kvm_mmu_notifier_invalidate_range_end C error done 167 999d 1086d 1/2 fixed on 2022/02/23 11:01

Sample crash report:
------------[ cut here ]------------
kernel BUG at arch/x86/kvm/../../../virt/kvm/kvm_main.c:2955!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 12098 Comm: syz-executor.4 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kvm_read_guest_offset_cached+0x3aa/0x440 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2955
Code: 00 48 c7 c2 c0 08 a2 89 be 0b 03 00 00 48 c7 c7 60 0d a2 89 c6 05 71 fe 73 0c 01 e8 62 58 f8 07 e9 d6 fc ff ff e8 e6 1c 6f 00 <0f> 0b e8 df 1c 6f 00 48 8b 74 24 10 4c 89 ef 4c 89 e1 48 8b 54 24
RSP: 0018:ffffc9000630fa18 EFLAGS: 00010212
RAX: 000000000000a941 RBX: ffff8880a5322798 RCX: ffffc90011f6e000
RDX: 0000000000040000 RSI: ffffffff81087dda RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000004 R09: ffffc900062e3f53
R10: ffffffff81087b0f R11: 0000000000000002 R12: 0000000000000004
R13: ffffc900062d9000 R14: 0000000000000000 R15: ffff8880a9c20000
FS:  00007ffbc6103700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff74dc55718 CR3: 000000009d029000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 handle_vmptrld arch/x86/kvm/vmx/nested.c:5304 [inline]
 handle_vmptrld+0x39d/0x820 arch/x86/kvm/vmx/nested.c:5266
 __vmx_handle_exit arch/x86/kvm/vmx/vmx.c:6012 [inline]
 vmx_handle_exit+0x4f7/0x18a0 arch/x86/kvm/vmx/vmx.c:6029
 vcpu_enter_guest+0x2b41/0x4440 arch/x86/kvm/x86.c:9941
 vcpu_run arch/x86/kvm/x86.c:10008 [inline]
 kvm_arch_vcpu_ioctl_run+0x4fc/0x21a0 arch/x86/kvm/x86.c:10203
 kvm_vcpu_ioctl+0x570/0xf30 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3709
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ffbc8b8dae9
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:00007ffbc6103188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffbc8ca0f60 RCX: 00007ffbc8b8dae9
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 00007ffbc8be7f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffbc91d4b2f R14: 00007ffbc6103300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 186247a8feeb66c4 ]---
RIP: 0010:kvm_read_guest_offset_cached+0x3aa/0x440 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2955
Code: 00 48 c7 c2 c0 08 a2 89 be 0b 03 00 00 48 c7 c7 60 0d a2 89 c6 05 71 fe 73 0c 01 e8 62 58 f8 07 e9 d6 fc ff ff e8 e6 1c 6f 00 <0f> 0b e8 df 1c 6f 00 48 8b 74 24 10 4c 89 ef 4c 89 e1 48 8b 54 24
RSP: 0018:ffffc9000630fa18 EFLAGS: 00010212
RAX: 000000000000a941 RBX: ffff8880a5322798 RCX: ffffc90011f6e000
RDX: 0000000000040000 RSI: ffffffff81087dda RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000004 R09: ffffc900062e3f53
R10: ffffffff81087b0f R11: 0000000000000002 R12: 0000000000000004
R13: ffffc900062d9000 R14: 0000000000000000 R15: ffff8880a9c20000
FS:  00007ffbc6103700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fec533b5718 CR3: 000000009d029000 CR4: 00000000003526e0

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/29 07:28 upstream d06c942efea4 63eeac02 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/27 09:31 upstream c5c17547b778 63eeac02 .config console log report info ci-upstream-kasan-gce-selinux-root kernel BUG in kvm_read_guest_offset_cached
2021/11/23 20:23 upstream 136057256686 545ab074 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/20 06:30 upstream 4c388a8e740d 3a9d0024 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/19 11:26 upstream 4c388a8e740d 31a30fc0 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/19 10:35 upstream 6fdf886424cf 31a30fc0 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/19 00:55 upstream 6fdf886424cf 31a30fc0 .config console log report info ci-upstream-kasan-gce-smack-root kernel BUG in kvm_read_guest_offset_cached
2021/11/18 22:39 upstream 6fdf886424cf 31a30fc0 .config console log report info ci-upstream-kasan-gce-smack-root kernel BUG in kvm_read_guest_offset_cached
2021/11/18 22:06 upstream 6fdf886424cf 31a30fc0 .config console log report info ci-upstream-kasan-gce kernel BUG in kvm_read_guest_offset_cached
2021/11/28 21:32 linux-next f81e94e91878 63eeac02 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in kvm_read_guest_offset_cached
2021/11/25 05:34 linux-next 4b74e088fef6 545ab074 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in kvm_read_guest_offset_cached
* Struck through repros no longer work on HEAD.