LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
kvm_get_vcpu_by_cpuid() takes a cpuid parameter whose type is int, so cpuid can be negative. Let kvm_get_vcpu_by_cpuid() return NULL for this case so as to make it more robust.
This fix an out-of-bounds access to kvm_arch::phyid_map::phys_map[].
From the CVE record · Linux
The Linux kernel’s LoongArch KVM code can access an array out of bounds when kvm_get_vcpu_by_cpuid() receives a negative CPU ID. The input does not specify how an attacker could cause this, or whether authentication, local access, or user interaction is required.
Engineers running Linux kernels with LoongArch KVM should check their versions against the vendor advisory; affected versions were not provided.