CVE-2026-63885: drm/gem: fix race between change_handle and handle_delete
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/gem: fix race between change_handle and handle_delete
drm_gem_change_handle_ioctl leaves the old handle live in the IDR during the window between spin_unlock(table_lock) and the final spin_lock(table_lock). A concurrent drm_gem_handle_delete on the old handle succeeds in this window, decrements handle_count to 0, and frees the GEM object while the new handle's IDR entry still references it.
NULL the old handle's IDR entry before dropping table_lock so that any concurrent GEM_CLOSE on the old handle sees NULL and returns -EINVAL. Restore the old entry on the prime-bookkeeping error path.
The Linux kernel CVE team has assigned CVE-2026-63885 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.18.32 with commit 672464dd53231509c9c771110798c56d4660e19e and fixed in 6.18.35 with commit 0dfa42cfe4dbe114533480503934f43e33c1e83d Issue introduced in 7.0.9 with commit 61bd96d3e5472c253f9c1ab77608f0c8aaa9d025 and fixed in 7.0.12 with commit cde2c9257cbe8463b9dcf7b1075177b72b5fd938
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-63885
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/drm_gem.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/0dfa42cfe4dbe114533480503934f43e33c1e83d https://git.kernel.org/stable/c/cde2c9257cbe8463b9dcf7b1075177b72b5fd938 https://git.kernel.org/stable/c/7164d78559b0ff29931a366a840a9e5dd53d4b7c