CVE-2026-99772: drm/drm_crtc: fix race with dma_fence_signal() in ::get_driver_name()
In the Linux kernel, the following vulnerability has been resolved:
drm/drmcrtc: fix race with dmafencesignal() in ::getdrivername()
Since commit 541c8f2468b9 ("dma-buf: detach fence ops on signal v3"), I'm seeing the BUGON() triggering in drmcrtc's fencetocrtc() via drmcrtcfencegetdrivername() regularly:
Call trace: panic+0x58/0x5c die+0x160/0x178 bugbrkhandler+0x70/0xa4 callel1breakhook+0x3c/0x1a0 doel1brk64+0x24/0x74 el1brk64+0x34/0x54 el1h64synchandler+0x80/0xfc el1h64sync+0x84/0x88 drmcrtcfencegetdrivername+0x60/0x68 (P) syncfilegetname+0x184/0x45c syncfileioctl+0x404/0xf70 arm64sysioctl+0x124/0x1dc
This looks to be caused by a code flow similar to the following:
+++ snip +++ thread A thread B
ioctl(SYNCIOCFILEINFO) syncfileioctl() syncfilegetname() dmafencesignaltimestamplocked() dmafencedrivername() ops = rcudereference(fence->ops) if (!dmafencetestsignaledflag()) ops->getdrivername(fence) i.e. drmcrtcfencegetdrivername() testandsetbit(SIGNALED) RCUINITPOINTER(fence->ops, NULL) drmcrtcfencegetdrivername() BUGON(rcuaccesspointer(fence->ops) != &drmcrtcfenceops) +++ snap +++
In other words, a fence's ops pointer can now change to NULL on signal, which wasn't the case before the culprit commit and hence the BUGON() triggers.
Simply drop the BUGON() as it's usage of fence ops is invalid now, and because using BUGON() and friends to take down the system is an unacceptable way to handle a failure.
Note that the adjacent drmcrtcfencegettimelinename() has the same problem and is fixed by this patch as well.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5