]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 19 Jul 2021 13:05:00 +0000 (16:05 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Aug 2021 13:48:37 +0000 (09:48 -0400)
commit4f7a0519fa422f6f652904715293c304948667b3
tree42c6b74cec101cdffce4c14e608b4c672adb4b61
parentcf4621047a3909e55b10f7e9e819330c9fad503f
KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)

If L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable
Virtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor),
then VMLOAD/VMSAVE must operate on the L1 physical memory, which is only
possible by making L0 intercept these instructions.

Failure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted,
and thus read/write portions of the host physical memory.

Fixes: 38baf72d54d9 ("KVM: SVM: Enable Virtual VMLOAD VMSAVE feature")
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c