CVE-2022-50226

crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak

State
Published
Severity
Not scored
Published
Jun 18, 2025
Updated
May 11, 2026
Reserved
Jun 18, 2025

Read the record on cve.org

Description

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • e799035609e1526761aa2f896a974b233d04d36d to before 4c5300f6f5e18b11c02a92f136e69b98fddba15eAffected
  • e799035609e1526761aa2f896a974b233d04d36d to before f2a920daa780956b987c14b9f23de7c3c8915bf2Affected
  • e799035609e1526761aa2f896a974b233d04d36d to before caa395aa16e7c9193fd7fa6cde462dd8229d4953Affected
  • e799035609e1526761aa2f896a974b233d04d36d to before e11fb0a3a39bb42da35fa662c46ce7391f277436Affected
  • e799035609e1526761aa2f896a974b233d04d36d to before 13dc15a3f5fd7f884e4bfa8c011a0ae868df12aeAffected
LinuxLinux
  • 4.16Affected
  • before 4.16Not affected
  • 5.10.173 through 5.10.*Not affected
  • 5.15.61 through 5.15.*Not affected
  • 5.18.18 through 5.18.*Not affected
  • 5.19.2 through 5.19.*Not affected
  • 6.0 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.