CVE-2026-46215: drm: Set old handle to NULL before prime swap in change_handle

Published May 28, 2026
·
Updated

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

drm: Set old handle to NULL before prime swap in changehandle

There was a potential race condition in changehandle. The ioctl briefly had a single object with two idr entries; a concurrent gemclose could delete the object and remove one of the handles while leaving the other one dangling, which could subsequently be dereferenced for a use-after-free.

To fix this, do the same dance that gemclose itself does. (f6cd7daecff5 drm: Release driver references to handle before making it available again) First idrreplace the old handle to NULL. Later, if the prime operations are successful, actually close it.

createtail required a similar dance to avoid a similar problem. (bd46cece51a3 drm/gem: Fix race in drmgemhandlecreatetail()) It idrallocs the new handle with NULL, then swaps in the correct object later to avoid races. We don't need to do that here, since the only operations that could race are drmprime, and changehandle holds the prime lock for the entire duration.

v2: cleanups of error paths

Affected Software

5 affected components
Linux Linux kernel (DRM subsystem)
Linux Linux kernel>=6.18<6.18.32
Linux Linux kernel>=6.19<7.0.9
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch bd46cece51a3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch f6cd7daecff5
  3. Configuration

    In DRM GEM handle change/create_tail logic, implement the race fix by first idr_replace the old handle to NULL, idr_alloc the new handle with NULL then swap in the correct handle, and keep the object/handle updates consistent with the 'dance' used by gem_close (including v2 cleanup of error paths) to prevent use-after-free via concurrent drm_prime.

    Linux kernel DRM GEM (drm_gem) change_handle / create_tail handle lifecycle = Set old handle to NULL (idr_replace old handle -> NULL) before prime swap; idr_alloc new handle with NULL then swap correct pointer; use same 'dance' as gem_close; v2 cleanup of error paths

Event History

May 28, 2026
CVE Published
via MITRE·09:40 AM
Data Sourced
via MITRE·09:40 AM
DescriptionSeverity
Data Sourced
via NVD·10:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·11:05 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-46215?

The severity of CVE-2026-46215 is high with a score of 7.8.

2

How do I fix CVE-2026-46215?

To fix CVE-2026-46215, update your Linux kernel to the latest version where this vulnerability has been patched.

3

What type of vulnerability is CVE-2026-46215?

CVE-2026-46215 is classified as a Use After Free and Race Condition vulnerability.

4

What impacts does CVE-2026-46215 have on the system?

CVE-2026-46215 can potentially allow an attacker to exploit race conditions leading to system instability or unauthorized access.

5

Which component is affected by CVE-2026-46215?

CVE-2026-46215 affects the Linux kernel's DRM subsystem.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203