CVE-2026-63939

KVM: SEV: Compute the correct max length of the in-GHCB scratch area

Published Jul 19, 2026 CVSS 3.1 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

KVM: SEV: Compute the correct max length of the in-GHCB scratch area

When setting the length of the GHCB scratch area, and the area is in the
GHCB shared buffer, set the effective length of the scratch area to the max
possible size given the start of the guest-provided pointer, and the end of
the shared buffer.

The code was "fine" when first introduced, as KVM doesn't consult the
length of the buffer when emulating MMIO, because the passed in @len always
specifies the *max* size required. But for PSC requests, the incoming @len
is just the minimum length (to process the header), and KVM needs to know
the full size of the scratch area to avoid buffer overflows (spoiler alert).

Opportunistically rename @len => @min_len to better reflect its role.

Analysis

AI-generated

Technical impact

The Linux kernel's KVM SEV module incorrectly computes the maximum length of the in‑GHCB scratch area. The code treats the supplied length as a minimum, while the protection state controller path actually requires the full size to avoid buffer overflows. This miscalculation, classified as CWE‑131 (Incorrect Buffer Size) and CWE‑122 (Buffer Overflow), can allow a malicious guest to overflow the scratch buffer, corrupt host memory, and achieve arbitrary code execution on the host.

Affected Systems

All Linux installations running the KVM hypervisor with Secure Encrypted Virtualization enabled are potentially affected. The vulnerability applies to any kernel that has not incorporated the patches in the cited commits, regardless of distribution or release version, as the change is in the kernel's core KVM code.

Risk and Exploitability

The CVSS score of 9.3 indicates a high severity, and the EPSS score of less than 1% suggests low exploitation probability at present. The vulnerability is not listed in the CISA KEV catalog, indicating no known widespread attacks. The likely attack vector is a compromised or malicious guest VM that issues a protection state controller request triggering an out‑of-bounds write, thereby enabling the attacker to gain host control. The risk escalates if the host runs untrusted guests without additional isolation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the SEV scratch area length patch, as released by the upstream kernel maintainers.
  • If a kernel upgrade is not immediately possible, disable SEV support on KVM instances or restrict guest access to the scratch area by using appropriate QEMU command‑line options or host‑level isolation.
  • Apply additional host hardening measures such as enabling SELinux or other mandatory access control frameworks, and monitor for anomalous guest‑initiated PSC requests.

Generated by OpenCVE AI on October 20, 2026 at 03:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-122
Type Values Removed Values Added
Weaknesses CWE-119
CWE-787
Type Values Removed Values Added
Weaknesses CWE-119
CWE-787
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/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: KVM: SEV: Compute the correct max length of the in-GHCB scratch area When setting the length of the GHCB scratch area, and the area is in the GHCB shared buffer, set the effective length of the scratch area to the max possible size given the start of the guest-provided pointer, and the end of the shared buffer. The code was "fine" when first introduced, as KVM doesn't consult the length of the buffer when emulating MMIO, because the passed in @len always specifies the *max* size required. But for PSC requests, the incoming @len is just the minimum length (to process the header), and KVM needs to know the full size of the scratch area to avoid buffer overflows (spoiler alert). Opportunistically rename @len => @min_len to better reflect its role.
Title KVM: SEV: Compute the correct max length of the in-GHCB scratch area
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-131

    Incorrect Calculation of Buffer Size

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 8:17 PM
Reserved
Jul 19, 2026, 7:54 AM
Status
Analyzed
Published
Jul 19, 2026, 4:17 PM
Modified
Oct 28, 2026, 6:33 PM
Severity
Important
Public date
Jul 19, 2026, 12:00 AM