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

CVE-2026-98718: Linux Kernel KVM SEV Race Condition Vulnerability

CVE-2026-98718 is a race condition flaw in Linux Kernel KVM SEV that can corrupt memory during VM migration. This post explains the technical details, affected versions, impact, and mitigation steps.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98718 Overview

CVE-2026-98718 is a race condition in the Linux kernel's Kernel-based Virtual Machine (KVM) subsystem affecting AMD Secure Encrypted Virtualization (SEV) guests. The flaw resides in sev_migrate_from(), which performs cache maintenance after clearing the SEV active state on the source VM during intra-host migration. This ordering creates a window where memory reclaim can return guest pages to the host without a cache flush. A concurrent hardware cache flush (wbnoinvd) can then write stale guest ciphertext over data belonging to a new page owner, corrupting host or other guest memory.

Critical Impact

Memory corruption of pages reallocated during SEV guest migration, potentially affecting host integrity and other workloads on the same system.

Affected Products

  • Linux kernel with KVM AMD SEV support enabled
  • Systems running SEV-capable guests on AMD EPYC processors
  • Hypervisor hosts performing intra-host SEV VM migration

Discovery Timeline

  • 2026-10-18 - CVE-2026-98718 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98718

Vulnerability Analysis

The vulnerability is a Time-of-Check Time-of-Use (TOCTOU) race condition in the KVM SEV intra-host migration path. During sev_migrate_from(), the source VM's active flag was cleared before the explicit cache writeback occurred. Any concurrent unmap operation observing active = false skipped the automatic cache flush inside sev_guest_memory_reclaimed, allowing the host to free and reallocate the physical page immediately.

When sev_writeback_caches(src_kvm) subsequently issued the hardware wbnoinvd instruction, cached dirty ciphertext from the departing SEV guest was written back to the physical frame now owned by an unrelated allocation. The result is silent memory corruption affecting whichever subsystem or guest received the reclaimed page.

Root Cause

The root cause is incorrect operation ordering between state transition and cache maintenance. Clearing src->active acts as a signal to concurrent reclaim paths that no further SEV-specific flushing is required. Performing the writeback after this signal violates the invariant that encrypted guest data must be flushed before the owning VM relinquishes the pages.

Attack Vector

Triggering the condition requires an SEV guest undergoing intra-host migration while concurrent memory reclaim is in progress on the host. The window is narrow but reachable under realistic memory-pressure scenarios on multi-tenant hypervisors. Exploitation yields memory corruption of attacker-uncontrolled data, making this primarily a reliability and integrity issue rather than a direct code-execution primitive.

See the upstream fixes referenced in the kernel commit 8b7d4f68, commit 973ea703, and commit de83ff6a for the authoritative technical description.

Detection Methods for CVE-2026-98718

Indicators of Compromise

  • Unexplained memory corruption on hypervisors hosting SEV guests, particularly correlated with VM migration events
  • Kernel oops, filesystem corruption, or process crashes occurring shortly after KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM ioctls
  • Guest instability or data integrity failures in VMs that recently migrated between KVM instances on the same host

Detection Strategies

  • Audit running kernel versions against the fixed commits on affected stable branches to identify unpatched hypervisors
  • Correlate hypervisor memory errors with KVM SEV migration events in dmesg and audit logs
  • Monitor for abnormal rates of SEV intra-host migration activity on multi-tenant hosts

Monitoring Recommendations

  • Enable kernel address sanitization or memory error reporting (MCE) telemetry on SEV-enabled hosts
  • Centralize hypervisor logs and KVM tracepoints to a security data lake for retrospective analysis
  • Track package versions of kernel and KVM-related modules across the fleet to confirm patch deployment

How to Mitigate CVE-2026-98718

Immediate Actions Required

  • Inventory all hypervisors running SEV-capable workloads and identify kernels missing the fix
  • Schedule patched kernel deployment on affected hosts and reboot into the updated image
  • Where patching is deferred, limit or pause intra-host SEV guest migration operations

Patch Information

The fix reorders cache maintenance so sev_writeback_caches() executes before clearing the source VM's SEV active state. Apply the patches referenced in kernel commit 8b7d4f68, commit 973ea703, and commit de83ff6a, or install the vendor kernel update that incorporates them.

Workarounds

  • Disable intra-host SEV VM migration until a patched kernel is deployed
  • Reduce host memory pressure to shrink the reclaim race window on unpatched systems
  • Consolidate SEV workloads onto hosts with confirmed patched kernels and avoid mixing with legacy builds

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.