]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: really fix the size checks on KVM_SET_NESTED_STATE
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 May 2019 09:55:36 +0000 (11:55 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:27:02 +0000 (21:27 +0200)
commit7538591f00defbd54005711aaa2e9d0a14e66ec5
tree0ed4f7d6c17c0610b2d1306ee6cc3dd4def070fe
parent4f836be7bd37f594b10e264f26a887887c7cfe9c
KVM: nVMX: really fix the size checks on KVM_SET_NESTED_STATE

The offset for reading the shadow VMCS is sizeof(*kvm_state)+VMCS12_SIZE,
so the correct size must be that plus sizeof(*vmcs12).  This could lead
to KVM reading garbage data from userspace and not reporting an error,
but is otherwise not sensitive.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c