KVM: SEV: Pin source page for write when adding CPUID data for SNP guest
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:
KVM: SEV: Pin source page for write when adding CPUID data for SNP guest
When populating a guest_memfd instance with the initial CPUID data for an SNP guest, acquire a writable pin on the source page as KVM will write back the "correct" CPUID information if the userspace provided data is rejected by trusted firmware. Because KVM writes to the source page using a kernel mapping, pinning for read could result in KVM clobbering read-only memory.
Note, well-behaved VMMs are unlikely to be affected, as CPUID information is almost always dynamically generated by userspace, i.e. it's unlikely for the CPUID information to be backed by a read-only mapping.
[sean: rewrite shortlog and changelog, tag for stable@]
From the CVE record · Linux
When initializing CPUID data for an SNP guest, KVM may write to a source page it pinned for reading if trusted firmware rejects the userspace-provided data. If the page is backed by a read-only mapping, this can clobber read-only memory. The issue depends on locally supplied guest CPUID data; no network attack is described.
Engineers running Linux kernels with KVM SEV support for SNP guests should check whether their kernel is affected; affected versions were not provided.