Look up another CVE · open CVE-2026-53145 in the interactive tracker
CVE-2026-53145
drm/gem: Try to fix change_handle ioctl, attempt 4
Published 2026-06-25 (4 months ago) by the Linux kernel CNA. Subsystem drivers/gpu. Debian urgency: unimportant.
What to do, per Debian release
Debian's own status for CVE-2026-53145 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | not affected | 6.1.190-1 | Nothing to do. bookworm never shipped the vulnerable code. |
| Debian 13trixie | not affected | 6.12.113-1 | Nothing to do. trixie never shipped the vulnerable code. |
| Debian 14forky | fixed | 7.0.13-1 | Update the kernel and reboot. Fixed in 7.0.13-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 7.0.13-1 | Update the kernel and reboot. Fixed in 7.0.13-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
[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.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_ioctl.c
- What this is
- DRM DRIVERS AND MISC GPU PATCHESMAINTAINERS section matched on drivers/gpu/drm/ · Maintained
- Kernel module
- drm
Check it on the machine
grep -w CONFIG_DRM /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w drmPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormMnot built on amd64/cloud-amd64, arm64/cloud-arm64
- trixieBnot built on amd64/cloud-amd64, arm64/cloud-arm64, s390x/s390x
- forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64, s390x/s390x
- M
- a module where it is built at all; some flavours do not build it
- B
- built in on some, a module on others, absent on the rest
- Build switch
- CONFIG_DRM
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2026-06-25 (4 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.10%, higher than 0.8% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- unimportantsource
- Subsystem
- drivers/gpu
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.18.32 | 6.18.36 | c0639ede2f24 |
| 7.0.9 | 7.0.13 | 1d9b93df7fc7 |
| 7.1 | 7.1 | 1a4f03d22fb6 |
| 6.18.33 | 0 | 0 |
| 7.0.10 | 0 | 0 |
| 6.18.35 | 0 | 0 |
| 7.0.12 | 0 | 0 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable code is reached through the local DRM core ioctl DRM_IOCTL_GEM_CHANGE_HANDLE on a DRM device file, not through network or physical input. Render nodes expose this ioctl path to local userspace.
- AC:LAttack complexity, low
- The bug is a race between GEM_CHANGE_HANDLE and GEM_CLOSE on attacker-controlled handles, and the attacker can drive both sides with concurrent ioctl calls. Repetition and handle selection are under attacker control.
- PR:LPrivileges required, low
- The ioctl was registered with DRM_RENDER_ALLOW, so it does not require DRM master, authentication, or CAP_SYS_ADMIN on a render node. It requires local unprivileged access to the DRM device file.
- UI:NUser interaction, none
- No victim action is required after the attacker has local execution and device access. The attacker triggers the race directly with ioctl calls.
- S:UScope, unchanged
- The impact remains within the kernel security authority of the same host. This is not a VM escape, IOMMU bypass, or cross-scope boundary violation.
- C:HConfidentiality impact, high
- The race can leave a dangling GEM object pointer in the per-file IDR, producing a use-after-free. Under the required kernel guidance, UAF memory corruption is scored as high confidentiality impact.
- I:HIntegrity impact, high
- The dangling drm_gem_object can be reused and later dereferenced through driver callbacks, making function pointer hijack or arbitrary kernel write/code execution defensible. Under the required kernel guidance, UAF is high integrity impact.
- A:HAvailability impact, high
- The UAF and handle-count corruption can trigger kernel warnings, crashes, or panics through later GEM close/lookup paths. Kernel crash availability impact is high.