CVE-2026-31558

LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust

Published Apr 24, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
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[].

Analysis

AI-generated

Technical impact

The vulnerability exists in the LoongArch implementation of the Linux kernel’s KVM hypervisor. The function kvm_get_vcpu_by_cpuid() accepts a signed integer cpuid argument, and a negative value causes the routine to index the phyid_map::phys_map[] array outside its bounds. This out‑of‑bounds access can trigger a kernel panic or expose sensitive kernel memory, resulting in a denial of service or information leakage for a local attacker.

Affected Systems

The flaw affects Linux kernel releases 6.10 and all 7.0 release candidates (rc1 through rc7). It is present in the standard Linux kernel distribution and therefore impacts any system running one of those kernel versions, regardless of vendor. The CPE identifier confirms its reach across all Linux kernel builds.

Risk and Exploitability

The CVSS score of 8.8 indicates a high severity. With an EPSS score of less than 1%, the current data suggests a very low exploitation probability under normal conditions. The weakness is not listed in CISA’s KEV catalog. Exploitation would require local kernel access or control over a virtual machine executing KVM, implying a privileged or sophisticated adversary. The attack vector is likely local or confined to virtual machine guests, and no externally public exploits are documented at this time.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a patched release that includes the kvm_get_vcpu_by_cpuid() fix.
  • Reboot or reload the affected KVM modules to apply the updated code and clear any stale mappings that could still reference the out‑of‑bounds path.
  • Monitor system logs for Oops or BUG reports related to KVM and apply kernel updates promptly when new patches are released for LoongArch KVM.

Generated by OpenCVE AI on April 28, 2026 at 14:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6238-1 linux security update
History
Type Values Removed Values Added
Weaknesses CWE-125
CPEs cpe:2.3:o:linux:linux_kernel:6.10:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}

Type Values Removed Values Added
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[].
Title LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-839

    Numeric Range Comparison Without Minimum Check

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Aug 5, 2026, 12:23 PM
Reserved
Mar 9, 2026, 3:48 PM
Status
Analyzed
Published
Apr 24, 2026, 3:16 PM
Modified
Nov 11, 2026, 11:10 PM
Severity
Public date
Apr 24, 2026, 12:00 AM