summaryrefslogtreecommitdiff
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorJim Mattson <jmattson@google.com>2016-07-09 01:36:06 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-14 20:11:20 +0300
commit2f1fe81123f59271bddda673b60116bde9660385 (patch)
tree8fead675d92c2fbdc180db2231fd47e6ff067984 /block/blk-map.c
parent4e59516a12a6ef6dcb660cb3a3f70c64bd60cfec (diff)
downloadlinux-2f1fe81123f59271bddda673b60116bde9660385.tar.xz
KVM: nVMX: Fix memory corruption when using VMCS shadowing
When freeing the nested resources of a vcpu, there is an assumption that the vcpu's vmcs01 is the current VMCS on the CPU that executes nested_release_vmcs12(). If this assumption is violated, the vcpu's vmcs01 may be made active on multiple CPUs at the same time, in violation of Intel's specification. Moreover, since the vcpu's vmcs01 is not VMCLEARed on every CPU on which it is active, it can linger in a CPU's VMCS cache after it has been freed and potentially repurposed. Subsequent eviction from the CPU's VMCS cache on a capacity miss can result in memory corruption. It is not sufficient for vmx_free_vcpu() to call vmx_load_vmcs01(). If the vcpu in question was last loaded on a different CPU, it must be migrated to the current CPU before calling vmx_load_vmcs01(). Signed-off-by: Jim Mattson <jmattson@google.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions