syzbot


WARNING in free_loaded_vmcs (2)

Status: fixed on 2019/04/02 11:50
Reported-by: syzbot+01bc9e7a8a3f138b71cf@syzkaller.appspotmail.com
Fix commit: 5bea5123cbf0 KVM: VMX: check nested state and CR4.VMXE against SMM
First crash: 1417d, last: 1391d

Cause bisection: introduced by (bisect log) :
commit 8fcc4b5923af5de58b80b53a069453b135693304
Author: Jim Mattson <jmattson@google.com>
Date: Tue Jul 10 09:27:20 2018 +0000

  kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

Crash: WARNING in free_loaded_vmcs (log)
Repro: syz .config
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING in free_loaded_vmcs C error 2 155d 155d 0/1 upstream: reported C repro on 2022/01/22 18:03
upstream WARNING in free_loaded_vmcs (3) C inconclusive 2 154d 154d 21/22 upstream: reported C repro on 2022/01/24 15:33
upstream WARNING in free_loaded_vmcs C 170 1671d 1679d 4/22 fixed on 2018/01/25 08:31

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/l1tf.html for details.
WARNING: CPU: 0 PID: 4942 at arch/x86/kvm/vmx.c:4754 free_loaded_vmcs+0x160/0x1b0 arch/x86/kvm/vmx.c:4754
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 4942 Comm: syz-executor0 Not tainted 4.19.0-rc2+ #220
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
 panic+0x238/0x4e7 kernel/panic.c:184
 __warn.cold.8+0x163/0x1ba kernel/panic.c:536
 report_bug+0x252/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:993
RIP: 0010:free_loaded_vmcs+0x160/0x1b0 arch/x86/kvm/vmx.c:4754
Code: 81 e8 44 be 53 00 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 49 4c 8b 23 e9 22 ff ff ff e8 80 fc 5f 00 <0f> 0b eb b0 e8 b7 f9 9e 00 e9 f4 fe ff ff 48 89 df e8 ca f9 9e 00
RSP: 0018:ffff8801d0637748 EFLAGS: 00010293
RAX: ffff8801d0848480 RBX: ffff8801d04e57a8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff811cd2a0 RDI: ffff8801d04e57b0
RBP: ffff8801d0637760 R08: ffff8801d0848480 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801d3954000
R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000001
 vmx_free_vcpu+0x204/0x300 arch/x86/kvm/vmx.c:10945
 kvm_arch_vcpu_free arch/x86/kvm/x86.c:8420 [inline]
 kvm_free_vcpus arch/x86/kvm/x86.c:8870 [inline]
 kvm_arch_destroy_vm+0x365/0x7c0 arch/x86/kvm/x86.c:8967
 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:752 [inline]
 kvm_put_kvm+0x73f/0x1060 arch/x86/kvm/../../../virt/kvm/kvm_main.c:773
 kvm_vcpu_release+0x7b/0xa0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2407
 __fput+0x38a/0xa40 fs/file_table.c:278
 ____fput+0x15/0x20 fs/file_table.c:309
 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
 do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x410c30
Code: 01 f0 ff ff 0f 83 60 19 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 5d 53 63 00 00 75 14 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48 83 ec 08 e8 0a fc ff ff
RSP: 002b:00007ffcce65e8d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000410c30
RDX: 0000001b30820000 RSI: 00000000007334f0 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004129f0
R13: 0000000000412a80 R14: 0000000000000000 R15: badc0ffeebadface
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2018/09/04 09:03 upstream 60c1f89241d4 a4718693 .config log report syz
ci-upstream-kasan-gce 2018/09/04 02:40 upstream 60c1f89241d4 a4718693 .config log report syz
ci-upstream-linux-next-kasan-gce-root 2018/09/04 16:53 linux-next f2b6e66e9885 a4718693 .config log report syz
ci-upstream-kasan-gce 2018/09/04 00:03 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/08/10 06:36 upstream 112cbae26d18 1fb62d58 .config log report