# CVE-2026-46211: drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-05-28T09:40:28.890Z
- Modified: 2026-06-17T10:53:19.403Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()

msm_ioctl_gem_info_get_metadata() always returns 0 regardless of
errors. When copy_to_user() fails or the user buffer is too small,
the error code stored in ret is ignored because the function
unconditionally returns 0. This causes userspace to believe the
ioctl succeeded when it did not.

Additionally, kmemdup() can return NULL on allocation failure, but
the return value is not checked. This leads to a NULL pointer
dereference in the subsequent copy_to_user() call.

Add the missing NULL check for kmemdup() and return ret instead of 0.

Note that the SET counterpart (msm_ioctl_gem_info_set_metadata)
correctly returns ret.

Patchwork: https://patchwork.freedesktop.org/patch/714478/

(As written by CVE List.)

## Affected

- Linux Linux: from 9902cb999e4e913d98e8afe4b36c08e4a793e1ce before 697e1a9559f6962f999cc4c748c2ffffcc0a7a7a; from 9902cb999e4e913d98e8afe4b36c08e4a793e1ce before c57c861956b89f2e2528e6384d51e2dedd915809; from 9902cb999e4e913d98e8afe4b36c08e4a793e1ce before b079e85c91f446f29e808d8291189e897f1884ff; from 9902cb999e4e913d98e8afe4b36c08e4a793e1ce before 47cbfe2608314b833ad61a65827d8fb363bc2d2d; 6.8 (not affected: before 6.8; from 6.12.90 up to 6.12.*; from 6.18.32 up to 6.18.*; from 7.0.9 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.8 before 6.12.90; from 6.13 before 6.18.32; from 6.19 before 7.0.9

## References

- <https://git.kernel.org/stable/c/697e1a9559f6962f999cc4c748c2ffffcc0a7a7a> (patch)
- <https://git.kernel.org/stable/c/c57c861956b89f2e2528e6384d51e2dedd915809> (patch)
- <https://git.kernel.org/stable/c/b079e85c91f446f29e808d8291189e897f1884ff> (patch)
- <https://git.kernel.org/stable/c/47cbfe2608314b833ad61a65827d8fb363bc2d2d> (patch)

## Sources

- CVE List: [CVE-2026-46211](https://www.cve.org/CVERecord?id=CVE-2026-46211), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-46211](https://nvd.nist.gov/vuln/detail/CVE-2026-46211), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-46211 · Whole record: https://cve.day/CVE-2026-46211.json · Rebuilt by cve.day 2026-11-25T22:59:22.875Z
