CVE-2022-50226

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

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:03 AM UTC
Updated: June 17, 2026 at 05:23 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.16 ≤ v < 5.10.1734.16 ≤ v < 5.15.614.16 ≤ v < 5.18.184.16 ≤ v < 5.19.24.16 ≤ v < 6.05.11 ≤ v < 5.15.615.16 ≤ v < 5.18.185.19 ≤ v < 5.19.24.16e799035609e1526761aa2f896a974b233d04d36d
Vendor states this is fixed in 13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae (fixed)
Vendor states this is fixed in 4c5300f6f5e18b11c02a92f136e69b98fddba15e (fixed)
Vendor states this is fixed in caa395aa16e7c9193fd7fa6cde462dd8229d4953 (fixed)
Vendor states this is fixed in e11fb0a3a39bb42da35fa662c46ce7391f277436 (fixed)
Vendor states this is fixed in f2a920daa780956b987c14b9f23de7c3c8915bf2 (fixed)
Vendor states this is fixed in 4.16 (unaffected)
Vendor states this is fixed in 5.10.173 (unaffected)
Vendor states this is fixed in 5.15.61 (unaffected)
Vendor states this is fixed in 5.18.18 (unaffected)
Vendor states this is fixed in 5.19.2 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4c5300f6f5e18b11c02a92f136e69b98fddba15e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/caa395aa16e7c9193fd7fa6cde462dd8229d4953
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e11fb0a3a39bb42da35fa662c46ce7391f277436
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f2a920daa780956b987c14b9f23de7c3c8915bf2

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card