linux_dsm_epyc7002/arch/x86/kvm/vmx
Tom Roeder 3a33d030da kvm: x86/vmx: Use kzalloc for cached_vmcs12
This changes the allocation of cached_vmcs12 to use kzalloc instead of
kmalloc. This removes the information leak found by Syzkaller (see
Reported-by) in this case and prevents similar leaks from happening
based on cached_vmcs12.

It also changes vmx_get_nested_state to copy out the full 4k VMCS12_SIZE
in copy_to_user rather than only the size of the struct.

Tested: rebuilt against head, booted, and ran the syszkaller repro
  https://syzkaller.appspot.com/text?tag=ReproC&x=174efca3400000 without
  observing any problems.

Reported-by: syzbot+ded1696f6b50b615b630@syzkaller.appspotmail.com
Fixes: 8fcc4b5923
Cc: stable@vger.kernel.org
Signed-off-by: Tom Roeder <tmroeder@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-01-25 18:53:10 +01:00
..
capabilities.h KVM: x86: Add Intel PT virtualization work mode 2018-12-21 11:28:34 +01:00
evmcs.c x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper 2018-12-14 17:59:54 +01:00
evmcs.h x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper 2018-12-14 17:59:54 +01:00
nested.c kvm: x86/vmx: Use kzalloc for cached_vmcs12 2019-01-25 18:53:10 +01:00
nested.h KVM: nVMX: Move nested code to dedicated files 2018-12-14 17:59:46 +01:00
ops.h KVM: VMX: Move VMX instruction wrappers to a dedicated header file 2018-12-14 17:17:27 +01:00
pmu_intel.c
vmcs12.c KVM: nVMX: Move vmcs12 code to dedicated files 2018-12-14 12:34:30 +01:00
vmcs12.h KVM: nVMX: Move vmcs12 code to dedicated files 2018-12-14 12:34:30 +01:00
vmcs_shadow_fields.h
vmcs.h KVM: VMX: Move eVMCS code to dedicated files 2018-12-14 14:00:06 +01:00
vmenter.S KVM: VMX: Move VM-Enter + VM-Exit handling to non-inline sub-routines 2018-12-21 12:02:50 +01:00
vmx.c KVM: VMX: Use the correct field var when clearing VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL 2019-01-25 18:52:54 +01:00
vmx.h KVM: VMX: Move VM-Enter + VM-Exit handling to non-inline sub-routines 2018-12-21 12:02:50 +01:00