HIGH 7.8

CVE-2026-53145: Linux DRM Gem Handle Race Condition - Privilege Escalation Vulnerability

CVE-2026-53145 is a race condition vulnerability in the Linux kernel's DRM (Direct Rendering Manager) subsystem, specifically in the gem_change_handle ioctl. The vulnerability stems from multiple failed attempts to fix an underlying synchronization issue between the gem_close and gem_change_handle operations. A local attacker with standard user privileges can exploit this flaw to trigger a privilege escalation or cause denial of service. The kernel development team has disabled the affected ioctl pending a comprehensive fix and proper test coverage to prevent recurrence.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-367
Affected products
9 configuration(s)
Published / Modified
2026-06-25 / 2026-07-15

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: drm/gem: Try to fix change_handle ioctl, attempt 4 [airlied: just added some comments on how to reenable] On-list because the cat is out of the bag and we're clearly not good enough to figure this out in private. The story thus far: 5e28b7b94408 ("drm: Set old handle to NULL before prime swap in change_handle") tried to fix a race condition between the gem_close and gem_change_handle ioctls, but got a few things wrong: - There's a confusion with the local variable handle, which is actually the new handle, and so the two-stage trick was actually applied to the wrong idr slot. 7164d78559b0 ("drm/gem: fix race between change_handle and handle_delete") tried to fix that by adding yet another code block, but forgot to add the error handling. Which meant we now have two paths, both kinda wrong. - dc366607c41c ("drm: Replace old pointer to new idr") tried to apply another fix, but inconsistently, again because of the handle confusion - this would be the right fix (kinda, somewhat, it's a mess) if we'd do the two-stage approach for the new handle. Except that wasn't the intent of the original fix. We also didn't have an igt merged for the original ioctl, which is a big no-go. This was attempted to address off-list in the original bugfix, and amd QA people claimed the bug was fixed now. Very clearly that's not the case. Here's my attempt to sort this out: - Rename the local variable to new_handle, the old aliasing with args->handle is just too dangerously confusing. - Merge the gem obj lookup with the two-stage idr_replace so that we avoid getting ourselves confused there. - This means we don't have a surplus temporary reference anymore, only an inherited from the idr. A concurrent gem_close on the new_handle could steal that. Fix that with the same two-stage approach create_tail uses. This is a bit overkill as documented in the comment, but I also don't trust my ability to understand this all correctly, so go with the established pattern we have from other ioctls instead for maximum paranoia. - Adjust error paths. I've tried to make the error and success paths common, because they are identical except for which handle is removed and on which we call idr_replace to (re)install the object again. But that made things messier to read, so I've left it at the more verbose version, which unfortunately hides the symmetry in the entire code flow a bit. - While at it, also replace the 7 space indent with 1 tab. And finally, because I flat out don't trust my abilities here at all anymore: - Disable the ioctl until we have the igt situation and everything else sorted out on-list and with full consensus. v2: Sashiko noticed that I didn't handle the error path for idr_replace correctly, it must be checked with IS_ERR_OR_NULL like in gem_handle_delete. So yeah, definitely should just the existing paths 1:1 because this is endless amounts of tricky. Also add the Fixes: line for the original ioctl, I forgot that too.

6 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in the DRM gem_change_handle ioctl implementation, where a race condition can occur between concurrent gem_close and gem_change_handle operations. Previous patches introduced inconsistent state management due to confusion between local variable naming (handle vs. new_handle) and incorrect two-stage IDR (ID Radix tree) replacement logic. The current patch series addresses this by: renaming variables for clarity, merging gem object lookup with IDR operations, applying the two-stage approach consistently to prevent temporary reference leaks, and most critically, disabling the ioctl entirely until the implementation and test coverage (IGT) are properly validated. The vulnerability is classified as CWE-367 (Time-of-Check-Time-of-Use race condition).

Business impact

This vulnerability affects availability and integrity of systems running vulnerable Linux kernel versions. Local users can trigger memory corruption or kernel panic conditions, leading to denial of service. The privilege escalation potential means unprivileged users could gain elevated kernel access. For organizations running Linux-based workstations, servers, or embedded systems, exploitation could result in service interruptions, data corruption, or compromise of system integrity. The severity is heightened because the ioctl has been in a broken state through multiple incomplete fixes, suggesting the vulnerability may have been exploitable across multiple kernel releases.

Affected systems

The vulnerability affects the Linux kernel across multiple distributions including Red Hat Enterprise Linux and upstream Linux kernel versions. Any system running a kernel version that includes the vulnerable DRM gem_change_handle ioctl is at risk, particularly those where standard users have direct access to DRM device files. Embedded systems, container hosts, and multi-user systems present elevated risk due to local attack surface. The exact affected version range should be verified against each distribution's security advisory, as backports and stable branch inclusion varies.

Exploitability

The vulnerability requires local access to exploit; remote exploitation is not possible. An unprivileged local user (privilege level L in CVSS terminology) can trigger the race condition through targeted timing of gem_close and gem_change_handle syscalls. The ioctl interface is available on systems where user access to DRM devices is permitted, which is standard on most Linux desktops and development machines. Exploitability is practical given the race window, though consistency may vary depending on system load and architecture. No public exploit code is known at this time.

Remediation

The Linux kernel development team has disabled the gem_change_handle ioctl in the current fix pending full resolution of the underlying issues. The long-term remediation involves: applying the official kernel patch that disables the ioctl, awaiting a complete reimplementation with proper test coverage via the IGT (Intel GPU Tools) test suite, and only re-enabling the ioctl once consensus is reached on the mailing list. For immediate protection, users should upgrade to a kernel version that includes this patch, or verify that their kernel distribution has already disabled this ioctl. Red Hat users should follow Red Hat security advisories for RHEL-specific patch guidance.

Patch guidance

Apply the latest available kernel update from your distribution that includes the fix for CVE-2026-53145. For Red Hat Enterprise Linux users, patches are available through standard security update channels (yum/dnf). For upstream Linux, use a kernel version from the stable branch that includes the commit disabling the gem_change_handle ioctl. The patch is identifiable by the commit message referencing 'attempt 4' and disabling the ioctl. Verify that the update you apply actually disables the ioctl rather than applying an incomplete fix from earlier attempts. Test the patch in a non-production environment before wider deployment to ensure DRM functionality remains intact on affected systems.

Detection guidance

Detection is challenging because the vulnerability is triggered through normal kernel APIs. Monitor system logs for kernel warnings or panics related to DRM or IDR operations. On affected systems, you can verify if the ioctl is disabled by checking kernel source or attempting to use the DRM_IOCTL_GEM_CHANGE_HANDLE interface (will return an error on patched systems). Check running kernel version using 'uname -r' and cross-reference against your distribution's advisory to confirm patch application. For intrusion detection, monitor for unusual patterns of multiple rapid gem_change_handle or gem_close syscalls from non-privileged processes, though this is not a reliable indicator of active exploitation.

Why prioritize this

This vulnerability merits HIGH priority patching due to: (1) local privilege escalation potential affecting all multi-user and container host systems, (2) the history of multiple failed fixes indicating the flaw has likely persisted across kernel releases, (3) direct kernel memory manipulation risk, and (4) availability impact through denial of service. The fact that the vulnerability remained unfixed through multiple patch attempts suggests it may have been exploitable for an extended period. Organizations should prioritize patching workstations, development machines, and any multi-user systems where local user access is expected. Container hosts warrant especially prompt remediation.

Risk score, explained

The CVSS 3.1 score of 7.8 (HIGH) reflects: local attack vector (AV:L) limiting widespread remote exploitation, low complexity attack requiring race condition timing, low privilege requirements, no user interaction needed, and significant impact across confidentiality, integrity, and availability. The score appropriately captures the severity for local multi-user systems while excluding remote scenarios. This is a meaningful score for kernel-level memory corruption bugs but should be interpreted as 'high' only within the context of local-access threat models.

Frequently asked questions

Can this vulnerability be exploited remotely?

No. CVE-2026-53145 requires local access to the system and the ability to execute syscalls. It cannot be exploited over a network. Remote exploitation is not possible.

Why was the ioctl disabled instead of fixed immediately?

The gem_change_handle ioctl had been the subject of multiple incomplete fix attempts, each introducing new problems. The kernel team chose to disable it entirely to prevent further security regressions while a comprehensive fix and proper test coverage (IGT test suite) are developed. This is a conservative approach prioritizing security over functionality.

Do I need to recompile my kernel, or is a package update sufficient?

A standard distribution package update (from yum, apt, dnf, etc.) containing the patched kernel is sufficient. You do not need to manually recompile unless you maintain a custom kernel. After installing the update, reboot the system for the fix to take effect.

Which users can exploit this vulnerability?

Any unprivileged local user with access to DRM device files can attempt exploitation. This typically includes standard user accounts on systems with DRM-enabled graphics. Containerized workloads where container users can access the host DRM stack also present risk.

This analysis is based on the official vulnerability description and CVSS assessment. Specific affected version ranges, patch availability dates, and distribution-specific guidance should be verified against vendor security advisories from Red Hat, Canonical, SUSE, and the Linux kernel security team. This vulnerability requires local access and is not remotely exploitable. No public proof-of-concept code is known. Organizations should test patches in non-production environments before enterprise deployment. For the most current status on ioctl re-enablement and final remediation, monitor kernel mailing list discussions and official distribution security channels. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).