CVE-2026-31558
published high CVSS 3.1 · 8.8LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux73516e9da512adc63ba3859fbd82a21f6257348f to < 596c3f8069c4792f22fce8c4452f44410032d910 · 73516e9da512adc63ba3859fbd82a21f6257348f to < 878cf6acb4fd8ab4126cf9d369a5bb0e23123418 · 73516e9da512adc63ba3859fbd82a21f6257348f to < 47857b05bd50db01e211a1b6f513d57901cd3e6b · 73516e9da512adc63ba3859fbd82a21f6257348f to < 2db06c15d8c7a0ccb6108524e16cd9163753f354 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.10 (affected) · 0 to < 6.10 (unaffected · semver) · 6.12.80 through 6.12.* (unaffected · semver) · 6.18.21 through 6.18.* (unaffected · semver) · 6.19.11 through 6.19.* (unaffected · semver) · 7.0 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | trixie | linux | Advisory build | 6.12.85-1 | DSA-6238-1 |
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[].
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Scenarios
- en: AV:L - Exploitation requires local ability to run/control a LoongArch KVM guest or access KVM ioctls through `/dev/kvm`; the vulnerable code is not reachable directly over a network. AC:L - The attacker can directly supply the negative CPUID condition through guest hypercall register state or KVM interrupt-controller state, and no race or external timing condition is required. PR:L - The attacker needs access to a KVM VM or `/dev/kvm`, but the path does not require real host root or an init-namespace capability once KVM access is available. UI:N - No victim user action is required after the attacker can run the guest/KVM operation; the trigger is a direct hypercall or ioctl-driven interrupt-controller operation. S:C - The vulnerable component is host KVM, and a malicious guest or KVM user can affect host kernel memory, crossing the VM isolation boundary. C:H - The bug is an out-of-bounds access to the host kernel `phys_map` array, and under the required higher-severity rule this is treated as potentially exposing host kernel memory during exploitation. I:H - If the out-of-bounds entry is interpreted as an enabled vCPU, later interrupt-injection paths dereference and modify state through a bogus `struct kvm_vcpu` pointer, making host kernel memory corruption defensible. A:H - The reported failure includes UBSAN out-of-bounds warnings in host KVM, and attacker-controlled negative indices can reasonably cause host kernel oops, panic, or repeated denial of service.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 73516e9da512adc63ba3859fbd82a21f6257348f to < 596c3f8069c4792f22fce8c4452f44410032d910 (affected · git)73516e9da512adc63ba3859fbd82a21f6257348f to < 878cf6acb4fd8ab4126cf9d369a5bb0e23123418 (affected · git)73516e9da512adc63ba3859fbd82a21f6257348f to < 47857b05bd50db01e211a1b6f513d57901cd3e6b (affected · git)73516e9da512adc63ba3859fbd82a21f6257348f to < 2db06c15d8c7a0ccb6108524e16cd9163753f354 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.10 (affected)0 to < 6.10 (unaffected · semver)6.12.80 through 6.12.* (unaffected · semver)6.18.21 through 6.18.* (unaffected · semver)6.19.11 through 6.19.* (unaffected · semver)7.0 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
LoongArch: KVM: Make kvm_get_vcpu_by_cpuid() more robust
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 140804d7ac9308ed4615d7fd9d8849d645b79fca40662724d85a0ff2fdfc8367
- Ingested
- 23 Sep 2026, 09:09:24 UTC
- Source record
- Official CVE record