CVE-2026-64310: crypto: ccp - Do not initialize SNP for SEV ioctls
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Do not initialize SNP for SEV ioctls
Sashiko notes:
if SEV initialization fails and KVM is actively running normal VMs, could a userspace process trigger this code path via /dev/sev ioctls (e.g., SEVPDHGEN) and zero out MSRVMHSAVEPA globally? Would the next VMRUN execution for an active VM trigger a general protection fault and crash the host?
sevmovetoinitstate() is called for ioctls requiring only SEV firmware: SEVPEKGEN, SEVPDHGEN, SEVPEKCSR, SEVPEKCERTIMPORT, and SEVPDHCERTEXPORT. After the firmware command, it does SEVSHUTDOWN on the SEV firmware. Since these commands do not require SNP to be initialized, skip it by calling sevplatforminitlocked() which only initializes the SEV firmware. This way SNP is not Initialized at all, and HSAVEPA is not cleared.
The previous code saved any SEV initialization firmware error to initargs.error and then threw it away and hardcoded the return value of INVALIDPLATFORMSTATE regardless of the real firmware error. This patch changes it to surface the underlying error, which is hopefully both more useful and doesn't cause any problems.
Note that it is still safe to call sevfirmwareshutdown() directly: it calls sevsnpshutdownlocked(), which skips SNP shutdown if SNP was not initialized.
Affected Software
Remediation
Event History
Frequently Asked Questions
Who is exposed to this issue?
The affected scenario involves Linux hosts using the CCP driver with SEV support and actively running normal KVM virtual machines. Exploitation is through SEV ioctl requests to /dev/sev, so an attacker needs local access and permission to issue those ioctls.
What could exploitation do to a host running virtual machines?
If SEV initialization fails, certain SEV firmware-only ioctl paths could initialize SNP and clear MSR_VM_HSAVE_PA globally. A subsequent VMRUN for an active VM could then cause a general protection fault and crash the host.
Which operations are relevant to the vulnerable path?
The described path applies to SEV_PEK_GEN, SEV_PDH_GEN, SEV_PEK_CSR, SEV_PEK_CERT_IMPORT, and SEV_PDH_CERT_EXPORT. These operations require only SEV firmware and do not require SNP initialization.
What is the mitigation if the patch cannot be installed immediately?
Restrict access to /dev/sev so untrusted local processes cannot issue SEV ioctls, particularly on hosts actively running KVM virtual machines. The available patch changes these firmware-only operations to initialize only SEV firmware, avoiding SNP initialization and preservation issues with HSAVE_PA.