]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: nVMX: off by one in vmx_write_pml_buffer()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 May 2017 19:43:17 +0000 (22:43 +0300)
committerRadim Krčmář <rkrcmar@redhat.com>
Mon, 15 May 2017 14:08:56 +0000 (16:08 +0200)
commitf96acb9fd45396c833aab93b7d7b407a98aaf254
tree874f4adce443e6db0abd48b469cbb91398e57d87
parent4ebef8ee83551be0dff2a6efa2799f0faf7c0d33
kvm: nVMX: off by one in vmx_write_pml_buffer()

There are PML_ENTITY_NUM elements in the pml_address[] array so the >
should be >= or we write beyond the end of the array when we do:

pml_address[vmcs12->guest_pml_index--] = gpa;

Fixes: f733c8bf41d0 ("nVMX: Implement emulated Page Modification Logging")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c