KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak
For some sev ioctl interfaces, the length parameter that is passed maybe less than or equal to SEV_FW_BLOB_MAX_SIZE, but larger than the data that PSP firmware returns. In this case, kmalloc will allocate memory that is the size of the input rather than the size of the data. Since PSP firmware doesn't fully overwrite the allocated buffer, these sev ioctl interface may return uninitialized kernel slab memory.
From the CVE record · Linux
Some KVM SVM SEV ioctl interfaces can return uninitialized kernel slab memory when the supplied length exceeds the data returned by PSP firmware. An attacker able to use these ioctl interfaces could receive that memory; the input does not specify authentication requirements.
Engineers running the Linux kernel should check their installations; affected versions are not specified.