Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-63937

CVE-2026-63937: Linux Kernel KVM SEV Race Condition Flaw

CVE-2026-63937 is a race condition vulnerability in Linux kernel KVM SEV that exposes TOCTOU bugs in Page State Change buffer handling. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2026-63937 Overview

CVE-2026-63937 is a Time-of-Check Time-of-Use (TOCTOU) race condition in the Linux kernel's Kernel-based Virtual Machine (KVM) subsystem. The flaw affects the Secure Encrypted Virtualization (SEV) code path that processes the guest-accessible Page State Change (PSC) buffer. The host reads entries and indices from the buffer without using READ_ONCE(), allowing a misbehaving guest to modify values between successive reads. The upstream fix introduces READ_ONCE() when consuming guest-controlled data from the PSC buffer to prevent inconsistent state during processing.

Critical Impact

A malicious or compromised SEV guest can exploit this race window to influence host-side processing of Page State Change requests, potentially impacting confidentiality, integrity, and availability of the hypervisor.

Affected Products

  • Linux kernel versions containing the KVM SEV PSC buffer handling code prior to the fix
  • Systems running AMD SEV/SEV-ES/SEV-SNP guests on affected kernels
  • Hypervisors relying on KVM for confidential virtual machine workloads

Discovery Timeline

  • 2026-07-19 - CVE-2026-63937 published to NVD
  • 2026-07-20 - Last updated in NVD database

Technical Details for CVE-2026-63937

Vulnerability Analysis

The Linux kernel's KVM SEV implementation processes Page State Change requests submitted by guests through a shared buffer. The host reads entries and indices from this buffer to determine which guest pages must transition between shared and private states. Because the buffer resides in guest-accessible memory, its contents can change asynchronously while the host is processing them.

Without READ_ONCE() annotations, the compiler is free to re-read values from memory or reorder loads. A guest that concurrently modifies the buffer can cause the host to observe different values for the same field across successive accesses. This produces a TOCTOU condition where validation checks pass against one value while subsequent operations use another.

The patch series applies READ_ONCE() to every guest-controlled load in the PSC processing logic. The kernel developers intentionally omit WRITE_ONCE() for host-generated writes because guests are not expected to read the buffer while the host is processing it. The mitigation is defensive against guests that violate the contract.

Root Cause

The root cause is missing volatile-qualified memory access on guest-shared data structures. Ordinary C reads permit compiler optimizations that assume single-threaded memory semantics, which do not hold when a hostile guest can rewrite shared memory between loads.

Attack Vector

Exploitation requires local access as a guest with the ability to issue SEV Page State Change requests. An attacker with control of a confidential VM races host processing of the PSC buffer by rewriting entries after the host performs validation but before it acts on the data. Because the vulnerability changes scope, successful exploitation can affect the host hypervisor and other guests.

No public proof-of-concept exploit is available, and the flaw is not listed in the CISA Known Exploited Vulnerabilities catalog.

Detection Methods for CVE-2026-63937

Indicators of Compromise

  • Unexpected KVM SEV error messages in dmesg or the kernel ring buffer referencing Page State Change failures
  • Guest VMs repeatedly triggering KVM_HC_MAP_GPA_RANGE or PSC hypercalls with malformed or rapidly changing entries
  • Anomalous host CPU utilization in KVM worker threads tied to SEV guests

Detection Strategies

  • Inventory host kernels running SEV-capable AMD EPYC hardware and compare installed versions against fixed commits b1dfaa6f, bd232801, c8cc2380, and edbbe88f.
  • Audit guest hypercall patterns for unusually high PSC request rates that may indicate race attempts.
  • Correlate host kernel logs with guest identifiers to isolate which VMs are triggering PSC handling errors.

Monitoring Recommendations

  • Forward host auditd and kernel logs to a centralized logging platform for retention and analysis.
  • Enable KVM tracepoints such as kvm:kvm_hypercall to record PSC-related activity during suspected incidents.
  • Track patch state of the kernel package across the hypervisor fleet using configuration management tooling.

How to Mitigate CVE-2026-63937

Immediate Actions Required

  • Update affected Linux kernels to versions that include the upstream fixes referenced in the mainline commits.
  • Reboot hypervisor hosts after patching to load the corrected KVM module.
  • Restrict which tenants can launch SEV guests until patches are deployed in shared hosting environments.

Patch Information

The fix is available in the upstream Linux kernel through four commits: Kernel Git Commit b1dfaa6, Kernel Git Commit bd2328, Kernel Git Commit c8cc23, and Kernel Git Commit edbbe8. Distribution vendors backport these commits into their supported stable kernel branches. Apply vendor-provided kernel updates as soon as they are available.

Workarounds

  • Disable SEV, SEV-ES, and SEV-SNP guest support on hypervisors that do not require confidential computing until patches are applied.
  • Limit guest VM creation privileges to trusted operators to reduce exposure to malicious guest images.
  • Isolate SEV-capable hosts from multi-tenant workloads while remediation is pending.
bash
# Verify running kernel version and check for SEV module status
uname -r
cat /sys/module/kvm_amd/parameters/sev
cat /sys/module/kvm_amd/parameters/sev_es
cat /sys/module/kvm_amd/parameters/sev_snp

# Temporarily disable SEV on the host until patched (requires reboot)
echo 'options kvm_amd sev=0 sev_es=0 sev_snp=0' | sudo tee /etc/modprobe.d/disable-sev.conf

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.