CVE-2026-99773: drm/drm_crtc: ensure dma_fence_ops remain valid during device unbind
In the Linux kernel, the following vulnerability has been resolved:
drm/drmcrtc: ensure dmafenceops remain valid during device unbind
In [1], sashiko reported the following issue:
=== snip === Looking at how these fences are managed, drmcrtccreatefence() creates a dmafence without taking a reference to the drmdevice or drmcrtc. Because the syncfile framework exposes this fence to userspace, the fence can outlive the CRTC.
The dmafence contract requires that data accessed by dmafenceops (like getdrivername) must remain valid for an RCU grace period after the fence is signaled. However, drmcrtccleanup() and the subsequent freeing of the device do not wait for an RCU grace period via synchronizercu().
If userspace calls ioctl(SYNCIOCFILEINFO) concurrently with a device hot-unplug:
CPU1 (Userspace) syncfilegetname() ops = rcudereference(fence->ops); if (!dmafencetestsignaledflag()) // Preempted or delayed here
CPU2 (Driver Teardown) Signals the fence (setting fence->ops = NULL) Destroys and frees the CRTC without waiting for an RCU grace period
CPU1 (Resumes) ops->getdrivername(fence) -> drmcrtcfencegetdrivername() crtc = fencetocrtc(fence); // Casts to the freed CRTC return crtc->dev->driver->name; // Use-after-free
...
Does the CRTC or DRM device need to be kept alive for the RCU grace period, or should the fence hold a proper reference to prevent the use-after-free when getdrivername() and gettimelinename() access the freed CRTC structure? === snap ===
I believe this to be a correct observation and this patch implements the suggestion of waiting for an RCU grace period before proceeding with destruction of the drmcrtc, so that getdrivername() and gettimelinename() can still work.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Compensating control
Wait for an RCU grace period (for example, with synchronize_rcu()) before proceeding with drm_crtc destruction during device unbind, so dma_fence_ops callbacks cannot access a freed CRTC.
Frequently Asked Questions
Who is exposed to this issue?
Systems using the Linux kernel DRM subsystem may be exposed when a DRM device can be hot-unplugged while userspace holds or queries a sync_file-backed CRTC fence.
What attacker or user action is needed to trigger it?
A userspace process must invoke SYNC_IOC_FILE_INFO on an exposed fence concurrently with DRM device hot-unplug and teardown. The race can cause fence operations to access a CRTC after it has been freed.
Is this limited to a particular driver or default configuration?
The available information identifies the DRM CRTC fence handling path in the Linux kernel, but does not identify a specific driver, configuration, or default exposure condition.
How can I tell whether a system is affected?
The supplied data does not provide affected version ranges or runtime indicators. Review the referenced stable-kernel commits to determine whether the relevant fixes are present in the running kernel source or package.