CVE-2026-31558: LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
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[].
Security readout for executives and security teams
Plain-English summary
A Linux KVM flaw on LoongArch systems allows a negative virtual-CPU identifier to cause an out-of-bounds memory access. The supplied CVSS score is 8.8, indicating potentially serious confidentiality, integrity, and availability consequences. Exposure appears limited to LoongArch virtualization hosts using KVM, rather than Linux systems generally.
Executive priority
Treat as a high-priority infrastructure update where LoongArch KVM hosts run untrusted or lower-trust workloads. Patch promptly through supported distribution channels. Other Linux environments have no demonstrated exposure in the supplied evidence, so confirm architecture and KVM use before escalating broadly.
Technical view
kvm_get_vcpu_by_cpuid() accepts a signed integer but did not reject negative CPU identifiers before indexing kvm_arch::phyid_map::phys_map[]. Stable-kernel fixes return NULL for negative values, preventing the out-of-bounds access. The supplied vector describes local, low-privileged exploitation with low complexity, no user interaction, and scope change.
Likely exposure
Prioritize Linux hosts running KVM on LoongArch architecture. Systems on other architectures or not using LoongArch KVM are not shown as affected by this bundle. The supplied version data is ambiguous and includes unusual entries, so determine exposure using distribution advisories and inclusion of the referenced stable commits.
Exploitation context
The supplied record is not in CISA KEV, and the bundle provides no evidence of active exploitation or a public exploit. The CVSS vector indicates an attacker would need local, low-privileged access. The sources do not establish the precise attack path, reliability, or whether practical guest-to-host compromise has been demonstrated.
Researcher notes
The root issue is signed-input validation preceding an array lookup. The remediation adds a negative-cpuid rejection path. No CWE, crash trace, proof of concept, concrete exploitation primitive, or demonstrated security-boundary crossing is supplied. Version ranges appear insufficiently normalized; commit ancestry or vendor backport status is more reliable than raw version matching.
Mitigation direction
Apply a vendor-supported kernel containing the relevant stable fix for your kernel branch.
Check Linux distribution security guidance for corrected package versions and reboot requirements.
Restrict untrusted access to affected LoongArch KVM virtualization hosts until patched.
If patching is delayed, consider suspending exposed LoongArch KVM workloads after assessing operational impact.
Validation and detection
Inventory LoongArch hosts and identify which systems have KVM enabled or loaded.
Record running kernel versions and compare them with current distribution security advisories.
Verify the installed kernel contains the applicable referenced stable commit or vendor backport.
After updating, confirm hosts booted into the corrected kernel and KVM workloads operate normally.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31558 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
5Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.