Commit d650014
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: d1cd3ce ("KVM: MMU: check guest CR3 reserved bits based on its physical address width.")
Reported-by: Jim Mattson <[email protected]>
Signed-off-by: Yu Zhang <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Jim Mattson <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>1 parent 95e2a3b commit d650014
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4102 | 4102 | | |
4103 | 4103 | | |
4104 | 4104 | | |
4105 | | - | |
| 4105 | + | |
4106 | 4106 | | |
4107 | | - | |
4108 | | - | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
4109 | 4111 | | |
4110 | 4112 | | |
4111 | 4113 | | |
| |||
0 commit comments