{"id":"CVE-2026-46215","aliases":["CVE-2026-46215"],"related":[],"kind":"vulnerability","state":"published","title":"drm: Set old handle to NULL before prime swap in change_handle","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm: Set old handle to NULL before prime swap in change_handle\n\nThere was a potential race condition in change_handle. The ioctl\nbriefly had a single object with two idr entries; a concurrent\ngem_close could delete the object and remove one of the handles\nwhile leaving the other one dangling, which could subsequently\nbe dereferenced for a use-after-free.\n\nTo fix this, do the same dance that gem_close itself does.\n(f6cd7daecff5 drm: Release driver references to handle before making it available again)\nFirst idr_replace the old handle to NULL. Later, if the prime\noperations are successful, actually close it.\n\ncreate_tail required a similar dance to avoid a similar problem.\n(bd46cece51a3 drm/gem: Fix race in drm_gem_handle_create_tail())\nIt idr_allocs the new handle with NULL, then swaps in the correct\nobject later to avoid races. We don't need to do that here, since\nthe only operations that could race are drm_prime, and\nchange_handle holds the prime lock for the entire duration.\n\nv2: cleanups of error paths","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm: Set old handle to NULL before prime swap in change_handle\n\nThere was a potential race condition in change_handle. The ioctl\nbriefly had a single object with two idr entries; a concurrent\ngem_close could delete the object and remove one of the handles\nwhile leaving the other one dangling, which could subsequently\nbe dereferenced for a use-after-free.\n\nTo fix this, do the same dance that gem_close itself does.\n(f6cd7daecff5 drm: Release driver references to handle before making it available again)\nFirst idr_replace the old handle to NULL. Later, if the prime\noperations are successful, actually close it.\n\ncreate_tail required a similar dance to avoid a similar problem.\n(bd46cece51a3 drm/gem: Fix race in drm_gem_handle_create_tail())\nIt idr_allocs the new handle with NULL, then swaps in the correct\nobject later to avoid races. We don't need to do that here, since\nthe only operations that could race are drm_prime, and\nchange_handle holds the prime lock for the entire duration.\n\nv2: cleanups of error paths","source":"cvelist"}],"published":"2026-05-28T09:40:32.050Z","modified":"2026-08-05T12:30:33.895Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"53096728b8910c6916ecc6c46a5abc5c678b58d9","fixed":"672464dd53231509c9c771110798c56d4660e19e","status":"affected"},{"type":"git","introduced":"53096728b8910c6916ecc6c46a5abc5c678b58d9","fixed":"61bd96d3e5472c253f9c1ab77608f0c8aaa9d025","status":"affected"},{"type":"git","introduced":"53096728b8910c6916ecc6c46a5abc5c678b58d9","fixed":"5e28b7b94408897e41c63477aabc9e1db439bc8c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.18","status":"unaffected"},{"type":"semver","introduced":"6.18.32","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.9","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.18","fixed":"6.18.32"},{"status":"affected","introduced":"6.19","fixed":"7.0.9"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/672464dd53231509c9c771110798c56d4660e19e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/61bd96d3e5472c253f9c1ab77608f0c8aaa9d025","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5e28b7b94408897e41c63477aabc9e1db439bc8c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/0xCyberstan/CVE-2026-46215-POC","tags":["exploit"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-09T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46215","url":"https://www.cve.org/CVERecord?id=CVE-2026-46215","licence":"CVE Terms of Use","modified":"2026-08-05T12:30:33.895Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46215","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46215","licence":"Public domain","modified":"2026-07-10T05:16:37.103Z"}],"updatedAt":"2026-11-25T22:59:22.879Z","epss":{"score":0.0017,"percentile":0.03659,"date":"2026-11-30T12:00:22.000Z"}}