crypto: ccp - Do not initialize SNP for ioctl(SNP_VLEK_LOAD)
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Do not initialize SNP for ioctl(SNP_VLEK_LOAD)
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., > SEV_PDH_GEN) and zero out MSR_VM_HSAVE_PA globally? Would the next VMRUN > execution for an active VM trigger a general protection fault and crash the > host?
The SEV firmware docs for SNP_VLEK_LOAD note:
> On SNP_SHUTDOWN, the VLEK is deleted.
That is, the initialization/shutdown wrapper here is pointless, because the firmware immediately throws away the key anyway. Instead, refuse to do anything if SNP has not been previously initialized.
This is an ABI break: before, this was a no-op and almost certainly a mistake by userspace, and now it returns -ENODEV. ABI compatibility could be maintained here by simply returning 0 in the check instead.
From the CVE record · Linux
The Linux kernel’s crypto ccp code could attempt SNP initialization during an SNP_VLEK_LOAD ioctl when SNP had not previously been initialized. A local userspace process able to issue /dev/sev ioctls could reach this path; the input raises a possible host-crash scenario but does not establish that it occurs. The fix rejects the operation with ENODEV instead of treating it as a no-op.
Engineers running Linux kernels with the affected crypto ccp code should check their kernel against the vendor advisory; affected versions are not specified.