{"id":"CVE-2026-99773","summary":"drm/drm_crtc: ensure dma_fence_ops remain valid during device unbind","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/drm_crtc: ensure dma_fence_ops remain valid during device unbind\n\nIn [1], sashiko reported the following issue:\n\n=== snip ===\nLooking at how these fences are managed, drm_crtc_create_fence()\ncreates a dma_fence without taking a reference to the drm_device or\ndrm_crtc. Because the sync_file framework exposes this fence to\nuserspace, the fence can outlive the CRTC.\n\nThe dma_fence contract requires that data accessed by dma_fence_ops\n(like get_driver_name) must remain valid for an RCU grace period after\nthe fence is signaled. However, drm_crtc_cleanup() and the subsequent\nfreeing of the device do not wait for an RCU grace period via\nsynchronize_rcu().\n\nIf userspace calls ioctl(SYNC_IOC_FILE_INFO) concurrently with a device\nhot-unplug:\n\nCPU1 (Userspace)\nsync_file_get_name()\n  ops = rcu_dereference(fence-\u003eops);\n  if (!dma_fence_test_signaled_flag())\n    // Preempted or delayed here\n\nCPU2 (Driver Teardown)\nSignals the fence (setting fence-\u003eops = NULL)\nDestroys and frees the CRTC without waiting for an RCU grace period\n\nCPU1 (Resumes)\n  ops-\u003eget_driver_name(fence) -\u003e drm_crtc_fence_get_driver_name()\n  crtc = fence_to_crtc(fence); // Casts to the freed CRTC\n  return crtc-\u003edev-\u003edriver-\u003ename; // Use-after-free\n\n...\n\nDoes the CRTC or DRM device need to be kept alive for the RCU grace\nperiod, or should the fence hold a proper reference to prevent the\nuse-after-free when get_driver_name() and get_timeline_name() access\nthe freed CRTC structure?\n=== snap ===\n\nI believe this to be a correct observation and this patch implements\nthe suggestion of waiting for an RCU grace period before proceeding\nwith destruction of the drm_crtc, so that get_driver_name() and\nget_timeline_name() can still work.","modified":"2026-11-20T21:02:32.926423328Z","published":"2026-11-20T05:51:37.923Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99773.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/07b2d7a3f2b984c20f5f2630a94f43ede387a8dc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3be436cbd3d265fe4fcfbb5b650edad7b2108443"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dd9a96b2271e28340acf2e3764914fe5f32f6102"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f8e6f4deb868fd9da3eda95db222609ab1edc18d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99773.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99773"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6d6003c4b613c93973e4e870d83f4bed2ad9ac34"},{"fixed":"dd9a96b2271e28340acf2e3764914fe5f32f6102"},{"fixed":"07b2d7a3f2b984c20f5f2630a94f43ede387a8dc"},{"fixed":"f8e6f4deb868fd9da3eda95db222609ab1edc18d"},{"fixed":"3be436cbd3d265fe4fcfbb5b650edad7b2108443"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99773.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.10.0"},{"fixed":"6.12.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99773.json"}}],"schema_version":"1.9.2"}