# CVE-2026-31558: LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-04-24T14:35:41.209Z
- Modified: 2026-11-11T23:10:00.263Z
- Weaknesses: CWE-125
- Assigned by: Linux

## Description

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[].

(As written by CVE List.)

## Affected

- Linux Linux: from 73516e9da512adc63ba3859fbd82a21f6257348f before 596c3f8069c4792f22fce8c4452f44410032d910; from 73516e9da512adc63ba3859fbd82a21f6257348f before 878cf6acb4fd8ab4126cf9d369a5bb0e23123418; from 73516e9da512adc63ba3859fbd82a21f6257348f before 47857b05bd50db01e211a1b6f513d57901cd3e6b; from 73516e9da512adc63ba3859fbd82a21f6257348f before 2db06c15d8c7a0ccb6108524e16cd9163753f354; 6.10 (not affected: before 6.10; from 6.12.80 up to 6.12.*; from 6.18.21 up to 6.18.*; from 6.19.11 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.10.1 before 6.12.80; from 6.13 before 6.18.21; from 6.19 before 6.19.11; 6.10; 7.0

## References

- <https://git.kernel.org/stable/c/596c3f8069c4792f22fce8c4452f44410032d910> (patch)
- <https://git.kernel.org/stable/c/878cf6acb4fd8ab4126cf9d369a5bb0e23123418> (patch)
- <https://git.kernel.org/stable/c/47857b05bd50db01e211a1b6f513d57901cd3e6b> (patch)
- <https://git.kernel.org/stable/c/2db06c15d8c7a0ccb6108524e16cd9163753f354> (patch)

## Sources

- CVE List: [CVE-2026-31558](https://www.cve.org/CVERecord?id=CVE-2026-31558), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2026-31558](https://nvd.nist.gov/vuln/detail/CVE-2026-31558), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-31558 · Whole record: https://cve.day/CVE-2026-31558.json · Rebuilt by cve.day 2026-11-25T22:59:19.483Z
