# CVE-2022-50867: drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-02)
- Published: 2025-12-30T12:15:38.520Z
- Modified: 2026-08-05T08:59:53.122Z
- Assigned by: Linux

## Description

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/

(As written by CVE List.)

## Affected

- Linux Linux: from b859f9b009bbfbc236d9b076c64c59ccb41b8737 before 4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1; from b859f9b009bbfbc236d9b076c64c59ccb41b8737 before 83d18e9d9c0150d98dc24e3642ea93f5e245322c; 5.17 (not affected: before 5.17; from 6.0.7 up to 6.0.*; from 6.1 up to *)

## References

- <https://git.kernel.org/stable/c/4b1bbc0571a5d7ee10f754186dc3d619b9ced5c1>
- <https://git.kernel.org/stable/c/83d18e9d9c0150d98dc24e3642ea93f5e245322c>

## Sources

- CVE List: [CVE-2022-50867](https://www.cve.org/CVERecord?id=CVE-2022-50867), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-50867](https://nvd.nist.gov/vuln/detail/CVE-2022-50867), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-50867 · Whole record: https://cve.day/CVE-2022-50867.json · Rebuilt by cve.day 2026-11-25T22:58:21.385Z
