In the Linux kernel, the following vulnerability has been resolved:
drm: fix race between partial drm_dev_register() failure and ioctl
If drm_dev_register() fails after registering a minor (e.g. render minor
registered, primary minor fails), userspace could have opened the first
minor and entered a drm_dev_enter() critical section. Since the
unplugged flag was never set, the ioctl proceeds while the error path
tears down device resources.
Fix this by introducing drm_dev_synchronize_unplug(), which sets the
unplugged flag and waits for the SRCU barrier, ensuring all in-flight
drm_dev_enter() critical sections complete before cleanup proceeds; call
it on the error path of drm_dev_register().
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - The race is entered by opening a newly published DRM minor (/dev/dri/renderD or card) and issuing ioctl/mmap into drm_dev_enter(); that is a local char-dev syscall path, not network, adjacent-radio, or USB packet processing.
AC:L - The attacker controls the userspace side (inotify on the new node, open, concurrent DRM_RENDER_ALLOW ioctl/mmap) and can force later drm_dev_register() steps to fail after the first minor is live (ENOMEM in create_compat_control_link or drm_modeset_register_all). Modern drivers skip drm_global_mutex, so open is not serialized with register.
PR:L - The commit's example publishes the render minor first; that node has no CAP_SYS_ADMIN check, and the overlapping ioctls are DRM_RENDER_ALLOW. Unprivileged local users on phones, desktops, and GPU VMs routinely open /dev/dri/renderD*.
UI:N - The attacker opens their own DRM fd and issues ioctls; GPU or hotplug display probe runs in kernel driver init and does not require a victim to mount media or open a file.
S:U - The use-after-free is of host-kernel DRM/driver resources that drm_dev_enter() is meant to protect, remaining in the same kernel authority; this is not a VM escape or IOMMU/DMA bypass.
C:H - On drm_dev_register() error, probe rollback frees devm MMIO and driver objects while an in-flight drm_dev_enter() ioctl/mmap still uses them, a use-after-free that enables kernel memory disclosure.
I:H - The same use-after-free of driver state during concurrent ioctl/mmap allows heap spraying, arbitrary writes, and control-flow hijack, matching kernel guidance that UAF is Integrity High.
A:H - Racing ioctl/mmap against probe teardown oopses or panics via stale mappings or freed objects; a use-after-free also crashes when not fully exploited.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The race is entered by opening a newly published DRM minor (/dev/dri/renderD or card) and issuing ioctl/mmap into drm_dev_enter(); that is a local char-dev syscall path, not network, adjacent-radio, or USB packet processing.
AC:L - The attacker controls the userspace side (inotify on the new node, open, concurrent DRM_RENDER_ALLOW ioctl/mmap) and can force later drm_dev_register() steps to fail after the first minor is live (ENOMEM in create_compat_control_link or drm_modeset_register_all). Modern drivers skip drm_global_mutex, so open is not serialized with register.
PR:L - The commit's example publishes the render minor first; that node has no CAP_SYS_ADMIN check, and the overlapping ioctls are DRM_RENDER_ALLOW. Unprivileged local users on phones, desktops, and GPU VMs routinely open /dev/dri/renderD*.
UI:N - The attacker opens their own DRM fd and issues ioctls; GPU or hotplug display probe runs in kernel driver init and does not require a victim to mount media or open a file.
S:U - The use-after-free is of host-kernel DRM/driver resources that drm_dev_enter() is meant to protect, remaining in the same kernel authority; this is not a VM escape or IOMMU/DMA bypass.
C:H - On drm_dev_register() error, probe rollback frees devm MMIO and driver objects while an in-flight drm_dev_enter() ioctl/mmap still uses them, a use-after-free that enables kernel memory disclosure.
I:H - The same use-after-free of driver state during concurrent ioctl/mmap allows heap spraying, arbitrary writes, and control-flow hijack, matching kernel guidance that UAF is Integrity High.
A:H - Racing ioctl/mmap against probe teardown oopses or panics via stale mappings or freed objects; a use-after-free also crashes when not fully exploited.
CVSS 3.1