syzbot


WARNING in nested_vmx_vmexit

Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+f1d2136db9c80d4733e8@syzkaller.appspotmail.com
Fix commit: a80dfc025924 KVM: VMX: Always clear vmx->fail on emulation_required
First crash: 249d, last: 228d

Cause bisection: introduced by (bisect log) :
commit c8607e4a086fae05efe5bffb47c5199c65e7216e
Author: Maxim Levitsky <mlevitsk@redhat.com>
Date: Mon Sep 13 14:09:53 2021 +0000

  KVM: x86: nVMX: don't fail nested VM entry on invalid guest state if !from_vmentry

Crash: WARNING in nested_vmx_vmexit (log)
Repro: C syz .config

Sample crash report:
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3596 at arch/x86/kvm/vmx/nested.c:4549 nested_vmx_vmexit+0x34c9/0x3b60 arch/x86/kvm/vmx/nested.c:4549
Modules linked in:
CPU: 1 PID: 3596 Comm: syz-executor942 Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:nested_vmx_vmexit+0x34c9/0x3b60 arch/x86/kvm/vmx/nested.c:4549
Code: 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 84 21 ef ff ff 48 c7 c7 48 48 91 8d e8 51 3c 9a 00 e9 10 ef ff ff e8 47 73 53 00 <0f> 0b e9 88 f5 ff ff e8 3b 73 53 00 0f 0b e9 b6 eb ff ff e8 2f 73
RSP: 0018:ffffc900027afa90 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888076c28000 RSI: ffffffff81242f79 RDI: 0000000000000003
RBP: ffffc900027afbe0 R08: 0000000000000007 R09: 0000000000000001
R10: ffffffff812424ff R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff88801cbfc000 R15: ffff88807de20000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a08d94d130 CR3: 000000000b88e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vmx_leave_nested arch/x86/kvm/vmx/nested.c:6222 [inline]
 nested_vmx_free_vcpu+0xa2/0xc0 arch/x86/kvm/vmx/nested.c:330
 vmx_free_vcpu+0x8d/0x1a0 arch/x86/kvm/vmx/vmx.c:6790
 kvm_arch_vcpu_destroy+0x72/0x2f0 arch/x86/kvm/x86.c:10996
 kvm_vcpu_destroy+0x1d/0xa0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:441
 kvm_free_vcpus arch/x86/kvm/x86.c:11433 [inline]
 kvm_arch_destroy_vm+0x33a/0x680 arch/x86/kvm/x86.c:11552
 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:1189 [inline]
 kvm_put_kvm+0x4fa/0xc00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1220
 kvm_vm_release+0x3f/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1243
 __fput+0x286/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xc14/0x2b40 kernel/exit.c:832
 do_group_exit+0x125/0x310 kernel/exit.c:929
 __do_sys_exit_group kernel/exit.c:940 [inline]
 __se_sys_exit_group kernel/exit.c:938 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:938
 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:0x7f56ce207b19
Code: Unable to access opcode bytes at RIP 0x7f56ce207aef.
RSP: 002b:00007ffdde3aa448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f56ce27b270 RCX: 00007f56ce207b19
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f56ce27b270
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>

Crashes (101):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/12/21 20:51 upstream 6e0567b73052 a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/21 20:18 upstream 6e0567b73052 a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/21 19:48 upstream 6e0567b73052 a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/21 17:23 upstream 6e0567b73052 a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/11 06:16 upstream b8a98b6bf66a 49ca1f59 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/11 04:48 upstream b8a98b6bf66a 49ca1f59 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/07 11:20 upstream f80ef9e49fdf 0230ba3e .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/21 19:20 linux-next 07f8c60fe60f a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/21 19:03 linux-next 07f8c60fe60f a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/21 18:39 linux-next 07f8c60fe60f a938f0b8 .config log report syz C WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/20 19:01 upstream a7904a538933 021b36cb .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/18 04:49 upstream 6441998e2e37 44068e19 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/17 05:16 upstream fa36bbe6d43f 44068e19 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/16 15:13 upstream 2b14864acbaa 8dd6a5e3 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/16 03:01 upstream 2b14864acbaa 572bcb40 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/15 22:14 upstream 2b14864acbaa 572bcb40 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/15 20:56 upstream 2b14864acbaa 572bcb40 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-selinux-root 2021/12/15 17:22 upstream 5472f14a3742 572bcb40 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/15 12:54 upstream 5472f14a3742 f752fb53 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/15 04:06 upstream 5472f14a3742 f752fb53 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/14 23:44 upstream 5472f14a3742 f752fb53 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/14 13:56 upstream 5472f14a3742 d018dd31 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/14 12:50 upstream 5472f14a3742 d018dd31 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/14 09:14 upstream 5472f14a3742 5d14b1ea .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/14 06:36 upstream 5472f14a3742 5d14b1ea .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/11 22:56 upstream 6f513529296f 49ca1f59 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/11 15:14 upstream 6f513529296f 49ca1f59 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/11 12:36 upstream b8a98b6bf66a 49ca1f59 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/10 02:16 upstream c741e49150db 4d4ce9bc .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/09 13:54 upstream 2a987e65025e b54aa474 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/09 10:00 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/09 04:25 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/09 04:08 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/09 04:08 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/09 04:08 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/09 04:03 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/09 04:03 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/09 04:03 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/09 02:42 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/09 02:17 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-qemu-upstream 2021/12/08 10:50 upstream 2a987e65025e a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/08 09:25 upstream 2a987e65025e 0230ba3e .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/08 09:25 upstream 2a987e65025e 0230ba3e .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/08 09:25 upstream 2a987e65025e 0230ba3e .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce-smack-root 2021/12/03 13:56 upstream 5f58da2befa5 c7c20675 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-kasan-gce 2021/12/01 13:37 upstream 58e1100fdc59 5fa3eacc .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/22 09:24 linux-next 07f8c60fe60f 6caa12e4 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/22 04:41 linux-next 07f8c60fe60f 6caa12e4 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/21 16:52 linux-next 07f8c60fe60f a938f0b8 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/18 09:09 linux-next fbf252e09678 44068e19 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/17 22:09 linux-next fbf252e09678 44068e19 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/14 22:19 linux-next ea922272cbe5 d018dd31 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/14 10:55 linux-next ea922272cbe5 5d14b1ea .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/13 02:05 linux-next ea922272cbe5 49ca1f59 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/09 04:20 linux-next 4eee8d0b64ec a4a2a501 .config log report info WARNING in nested_vmx_vmexit
ci-upstream-linux-next-kasan-gce-root 2021/12/09 04:06 linux-next 4eee8d0b64ec a4a2a501 .config log report info WARNING in nested_vmx_vmexit