]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: nVMX: do not use dangling shadow VMCS after guest reset
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jul 2019 16:41:10 +0000 (18:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2019 06:28:37 +0000 (08:28 +0200)
commit93e7720cc238bfb9784bb2b8d340b4595e7891b1
treebd5dd1a059e3c329907de01757b936a3969db3f1
parent7f1f86276515f6816a98f6ca3ef99c827d54642f
KVM: nVMX: do not use dangling shadow VMCS after guest reset

commit 88dddc11a8d6b09201b4db9d255b3394d9bc9e57 upstream.

If a KVM guest is reset while running a nested guest, free_nested will
disable the shadow VMCS execution control in the vmcs01.  However,
on the next KVM_RUN vmx_vcpu_run would nevertheless try to sync
the VMCS12 to the shadow VMCS which has since been freed.

This causes a vmptrld of a NULL pointer on my machime, but Jan reports
the host to hang altogether.  Let's see how much this trivial patch fixes.

Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Liran Alon <liran.alon@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/nested.c