CVE-2022-50867 (GCVE-0-2022-50867)

Vulnerability from cvelistv5 – Published: 2025-12-30 12:15 – Updated: 2025-12-30 13:56
VLAI?
Title
drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage adreno_show_object() is a trap! It will re-allocate the pointer it is passed on first call, when the data is ascii85 encoded, using kvmalloc/ kvfree(). Which means the data *passed* to it must be kvmalloc'd, ie. we cannot use the state_kcalloc() helper. This partially reverts commit ec8f1813bf8d ("drm/msm/a6xx: Replace kcalloc() with kvzalloc()"), but adds the missing kvfree() to fix the memory leak that was present previously. And adds a warning comment. Patchwork: https://patchwork.freedesktop.org/patch/507014/
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: b859f9b009bbfbc236d9b076c64c59ccb41b8737 , < 4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1 (git)
Affected: b859f9b009bbfbc236d9b076c64c59ccb41b8737 , < 83d18e9d9c0150d98dc24e3642ea93f5e245322c (git)
Create a notification for this product.
    Linux Linux Affected: 5.17
Unaffected: 0 , < 5.17 (semver)
Unaffected: 6.0.7 , ≤ 6.0.* (semver)
Unaffected: 6.1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c",
            "drivers/gpu/drm/msm/adreno/adreno_gpu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1",
              "status": "affected",
              "version": "b859f9b009bbfbc236d9b076c64c59ccb41b8737",
              "versionType": "git"
            },
            {
              "lessThan": "83d18e9d9c0150d98dc24e3642ea93f5e245322c",
              "status": "affected",
              "version": "b859f9b009bbfbc236d9b076c64c59ccb41b8737",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c",
            "drivers/gpu/drm/msm/adreno/adreno_gpu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.17"
            },
            {
              "lessThan": "5.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.7",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage\n\nadreno_show_object() is a trap!  It will re-allocate the pointer it is\npassed on first call, when the data is ascii85 encoded, using kvmalloc/\nkvfree().  Which means the data *passed* to it must be kvmalloc\u0027d, ie.\nwe cannot use the state_kcalloc() helper.\n\nThis partially reverts commit ec8f1813bf8d (\"drm/msm/a6xx: Replace\nkcalloc() with kvzalloc()\"), but adds the missing kvfree() to fix the\nmemory leak that was present previously.  And adds a warning comment.\n\nPatchwork: https://patchwork.freedesktop.org/patch/507014/"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-30T13:56:57.841Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1"
        },
        {
          "url": "https://git.kernel.org/stable/c/83d18e9d9c0150d98dc24e3642ea93f5e245322c"
        }
      ],
      "title": "drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50867",
    "datePublished": "2025-12-30T12:15:38.520Z",
    "dateReserved": "2025-12-30T12:06:07.136Z",
    "dateUpdated": "2025-12-30T13:56:57.841Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50867\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-30T13:16:01.533\",\"lastModified\":\"2025-12-30T14:15:51.963\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage\\n\\nadreno_show_object() is a trap!  It will re-allocate the pointer it is\\npassed on first call, when the data is ascii85 encoded, using kvmalloc/\\nkvfree().  Which means the data *passed* to it must be kvmalloc\u0027d, ie.\\nwe cannot use the state_kcalloc() helper.\\n\\nThis partially reverts commit ec8f1813bf8d (\\\"drm/msm/a6xx: Replace\\nkcalloc() with kvzalloc()\\\"), but adds the missing kvfree() to fix the\\nmemory leak that was present previously.  And adds a warning comment.\\n\\nPatchwork: https://patchwork.freedesktop.org/patch/507014/\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/83d18e9d9c0150d98dc24e3642ea93f5e245322c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…