AZL-115690: CVE-2026-99773 affecting package kernel 6.6.161.1-1
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.
- Compensating control
Call synchronize_rcu() and wait for an RCU grace period before proceeding with drm_crtc destruction, so dma_fence_ops callbacks cannot access the freed CRTC.