{"id":"CVE-2026-46211","summary":"drm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm/gem: fix error handling in msm_ioctl_gem_info_get_metadata()\n\nmsm_ioctl_gem_info_get_metadata() always returns 0 regardless of\nerrors. When copy_to_user() fails or the user buffer is too small,\nthe error code stored in ret is ignored because the function\nunconditionally returns 0. This causes userspace to believe the\nioctl succeeded when it did not.\n\nAdditionally, kmemdup() can return NULL on allocation failure, but\nthe return value is not checked. This leads to a NULL pointer\ndereference in the subsequent copy_to_user() call.\n\nAdd the missing NULL check for kmemdup() and return ret instead of 0.\n\nNote that the SET counterpart (msm_ioctl_gem_info_set_metadata)\ncorrectly returns ret.\n\nPatchwork: https://patchwork.freedesktop.org/patch/714478/","modified":"2026-07-08T07:28:32.303967964Z","published":"2026-05-28T09:40:28.890Z","related":["openSUSE-SU-2026:10954-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46211.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/47cbfe2608314b833ad61a65827d8fb363bc2d2d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/697e1a9559f6962f999cc4c748c2ffffcc0a7a7a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b079e85c91f446f29e808d8291189e897f1884ff"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c57c861956b89f2e2528e6384d51e2dedd915809"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46211.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46211"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9902cb999e4e913d98e8afe4b36c08e4a793e1ce"},{"fixed":"697e1a9559f6962f999cc4c748c2ffffcc0a7a7a"},{"fixed":"c57c861956b89f2e2528e6384d51e2dedd915809"},{"fixed":"b079e85c91f446f29e808d8291189e897f1884ff"},{"fixed":"47cbfe2608314b833ad61a65827d8fb363bc2d2d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46211.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.8.0"},{"fixed":"6.12.90"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.32"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46211.json"}}],"schema_version":"1.7.5"}