Skip to content
Commit d6500149 authored by Yu Zhang's avatar Yu Zhang Committed by Radim Krčmář
Browse files

KVM: x86: Fix the NULL pointer parameter in check_cr_write()

Routine check_cr_write() will trigger emulator_get_cpuid()->
kvm_cpuid() to get maxphyaddr, and NULL is passed as values
for ebx/ecx/edx. This is problematic because kvm_cpuid() will
dereference these pointers.

Fixes: d1cd3ce9

 ("KVM: MMU: check guest CR3 reserved bits based on its physical address width.")
Reported-by: default avatarJim Mattson <jmattson@google.com>
Signed-off-by: default avatarYu Zhang <yu.c.zhang@linux.intel.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarJim Mattson <jmattson@google.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 95e2a3b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment