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: NJim Mattson <jmattson@google.com> Signed-off-by: NYu Zhang <yu.c.zhang@linux.intel.com> Reviewed-by: NDavid Hildenbrand <david@redhat.com> Reviewed-by: NJim Mattson <jmattson@google.com> Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
Showing
想要评论请 注册 或 登录