crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory 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:
crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak
For some sev ioctl interfaces, input may be passed that is 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 buffer, the sev ioctl interfaces with the issue may return uninitialized slab memory.
Currently, all of the ioctl interfaces in the ccp driver are safe, but to prevent future problems, change all ioctl interfaces that allocate memory with kmalloc to use kzalloc and memset the data buffer to zero in sev_ioctl_do_platform_status.
From the CVE record · Linux
Some SEV ioctl buffers could contain uninitialized kernel memory when the supplied input size exceeds the data returned by PSP firmware. This could cause an ioctl response to disclose that memory, although the report states that all current ccp driver ioctl interfaces are safe. The input does not specify authentication, access, or user-interaction requirements.
Engineers running the Linux kernel should check their ccp driver; affected versions are not specified.