Skip to content
Heist/ feed
Back to feed
UnratedFix available

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

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.173, 5.15.61, 5.18.18, 5.19.2
CVEs
CVE-2022-50226
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 03:16 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 18 Jun 2025, 11:03 UTC

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.

osv:CVE-2022-50226

Kernel

Fixed versions: 5.10.173, 5.15.61, 5.18.18, 5.19.2

Complete source record
{
  "id": "99f545a65be59c01cebc88e71301b97c5555e7491957e3a3de077ff66a1ab306",
  "url": "https://osv.dev/vulnerability/CVE-2022-50226",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak",
    "summary": "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.",
    "evidence": "osv:CVE-2022-50226",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.173",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.61",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.18",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.19.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-50226",
      "aliases": [
        "CVE-2022-50226"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e799035609e1526761aa2f896a974b233d04d36d"
                },
                {
                  "fixed": "4c5300f6f5e18b11c02a92f136e69b98fddba15e"
                },
                {
                  "fixed": "f2a920daa780956b987c14b9f23de7c3c8915bf2"
                },
                {
                  "fixed": "caa395aa16e7c9193fd7fa6cde462dd8229d4953"
                },
                {
                  "fixed": "e11fb0a3a39bb42da35fa662c46ce7391f277436"
                },
                {
                  "fixed": "13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50226.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.16.0"
                },
                {
                  "fixed": "5.10.173"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.61"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.18.18"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "5.19.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50226.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.489015710Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae",
        "https://git.kernel.org/stable/c/4c5300f6f5e18b11c02a92f136e69b98fddba15e",
        "https://git.kernel.org/stable/c/caa395aa16e7c9193fd7fa6cde462dd8229d4953",
        "https://git.kernel.org/stable/c/e11fb0a3a39bb42da35fa662c46ce7391f277436",
        "https://git.kernel.org/stable/c/f2a920daa780956b987c14b9f23de7c3c8915bf2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50226.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50226",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50226.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50226",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 514479,
  "published_at": "2025-06-18T11:03:59.275+00:00"
}