summaryrefslogtreecommitdiffstats
path: root/block/holder.c
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2022-11-03 16:13:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-11-17 11:39:57 -0500
commited129ec9057f89d615ba0c81a4984a90345a1684 (patch)
tree0539a8ebd23a8333a1f0faaa459c3d342700da27 /block/holder.c
parentf9697df251438b0798780900e8b43bdb12a56d64 (diff)
downloadlinux-ed129ec9057f89d615ba0c81a4984a90345a1684.tar.bz2
KVM: x86: forcibly leave nested mode on vCPU reset
While not obivous, kvm_vcpu_reset() leaves the nested mode by clearing 'vcpu->arch.hflags' but it does so without all the required housekeeping. On SVM, it is possible to have a vCPU reset while in guest mode because unlike VMX, on SVM, INIT's are not latched in SVM non root mode and in addition to that L1 doesn't have to intercept triple fault, which should also trigger L1's reset if happens in L2 while L1 didn't intercept it. If one of the above conditions happen, KVM will continue to use vmcb02 while not having in the guest mode. Later the IA32_EFER will be cleared which will lead to freeing of the nested guest state which will (correctly) free the vmcb02, but since KVM still uses it (incorrectly) this will lead to a use after free and kernel crash. This issue is assigned CVE-2022-3344 Cc: stable@vger.kernel.org Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20221103141351.50662-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/holder.c')
0 files changed, 0 insertions, 0 deletions