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

CVE-2026-64307: Linux Kernel Privilege Escalation Flaw

CVE-2026-64307 is a privilege escalation vulnerability in the Linux kernel's crypto CCP driver that could allow unauthorized MSR manipulation. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-64307 Overview

CVE-2026-64307 affects the Linux kernel's AMD Cryptographic Coprocessor (CCP) driver, specifically the Secure Encrypted Virtualization Secure Nested Paging (SEV-SNP) initialization path exposed through the /dev/sev ioctl interface. When SEV initialization fails and Kernel-based Virtual Machine (KVM) is actively running normal virtual machines, a userspace process can invoke SNP_CONFIG and other /dev/sev ioctls to re-trigger SNP initialization. This code path can zero out the MSR_VM_HSAVE_PA register globally across CPUs. A subsequent VMRUN instruction on an active VM then triggers a general protection fault and crashes the host kernel.

Critical Impact

A local userspace process with access to /dev/sev can crash the host kernel on AMD systems running KVM guests when SEV initialization has previously failed.

Affected Products

  • Linux kernel builds shipping the AMD CCP driver with SEV-SNP support
  • Host systems running KVM on AMD EPYC processors with SEV enabled
  • Distributions consuming upstream stable kernels prior to the referenced fix commits

Discovery Timeline

  • 2026-07-25 - CVE-2026-64307 published to NVD
  • 2026-07-25 - Last updated in NVD database

Technical Details for CVE-2026-64307

Vulnerability Analysis

The vulnerability resides in the AMD CCP driver's SEV-SNP initialization logic. The driver permitted the SNP_CONFIG ioctl handler to retry full SNP initialization even when a prior initialization attempt had failed. Retrying initialization writes to MSR_VM_HSAVE_PA on every CPU, resetting the physical address that KVM uses to save host state during VM entry.

If KVM has already loaded and is running guests, the host has populated MSR_VM_HSAVE_PA per CPU. Zeroing this MSR while VMs are active leaves KVM without a valid save area. The next VMRUN executed by KVM raises a general protection fault (#GP) in the host, resulting in a kernel panic. The result is a denial-of-service condition against the hypervisor host triggered from an unprivileged code path exposed via character-device ioctls.

Root Cause

The root cause is missing state validation in the SNP_CONFIG ioctl handler. The handler treated failed SNP initialization as a recoverable state and permitted re-initialization, even though re-initialization has global side effects on active virtualization state. The fix refuses to retry initialization for SNP_CONFIG unless SNP was already successfully initialized. This is categorized as a Kernel Vulnerability and Denial of Service issue driven by improper state handling.

Attack Vector

Exploitation requires local access to the /dev/sev character device on an AMD host where SEV initialization has failed but KVM is running guest VMs. A userspace process invokes an ioctl such as SEV_PDH_GEN or SNP_CONFIG, which drives the driver back through SNP initialization. The initialization sequence overwrites MSR_VM_HSAVE_PA across CPUs. The next VM entry crashes the host. No memory corruption or code execution primitive is provided; the impact is host availability. Detailed patch context is available in the Kernel Git Commit 08f0e65, Kernel Git Commit 20f548c, Kernel Git Commit 345a6e8, and Kernel Git Commit 441ea32.

Detection Methods for CVE-2026-64307

Indicators of Compromise

  • Host kernel oops or panic referencing VMRUN, #GP, or MSR_VM_HSAVE_PA on AMD systems running KVM guests.
  • Kernel log entries from the ccp driver indicating SEV or SNP initialization failure followed by userspace ioctl activity on /dev/sev.
  • Unexpected process access to /dev/sev from non-virtualization-management processes.

Detection Strategies

  • Audit open() and ioctl() syscalls against /dev/sev and correlate with the invoking process lineage.
  • Monitor dmesg for ccp driver messages such as SEV init failures and repeated SNP configuration attempts.
  • Track host kernel panic telemetry on AMD KVM hosts to catch reproducible VMRUN faults following ioctl activity.

Monitoring Recommendations

  • Enable audit rules that log all access to /dev/sev with process, UID, and command line context.
  • Ship kernel logs and audit events into a centralized log platform for cross-host correlation.
  • Alert on any host crash on AMD KVM nodes that follows /dev/sev ioctl activity within a short time window.

How to Mitigate CVE-2026-64307

Immediate Actions Required

  • Apply the upstream stable kernel commits that refuse SNP_CONFIG re-initialization when SNP is not already initialized.
  • Restrict access to /dev/sev to trusted virtualization management components only, using file permissions and Mandatory Access Control (MAC) policies.
  • Reboot AMD KVM hosts where SEV initialization previously failed to restore consistent MSR state before enforcing new controls.

Patch Information

The upstream fix is available in the mainline Linux kernel and backports referenced by the following commits: 08f0e65, 20f548c, 345a6e8, and 441ea32. The patch introduces an ABI-visible change: SNP_CONFIG no longer transparently retries failed SNP initialization. Distributions should ship the corresponding backport before enabling SEV-SNP on production hypervisors.

Workarounds

  • Tighten /dev/sev permissions so only the virtualization management stack (for example, libvirtd or equivalent) can open the device.
  • Apply an AppArmor or SELinux policy that denies non-virtualization processes from issuing ioctls against /dev/sev.
  • On hosts that do not require SEV-SNP, disable SEV in firmware or blacklist SNP initialization until the patched kernel is deployed.
bash
# Restrict /dev/sev to the virtualization group and audit access
chown root:kvm /dev/sev
chmod 0660 /dev/sev

# auditd rule to log all access to /dev/sev
echo '-w /dev/sev -p rwa -k sev_ioctl' >> /etc/audit/rules.d/sev.rules
augenrules --load

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.