drm: fix race between partial drm_dev_register() failure and ioctl
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bee330f3d67273a68dcb99f59480d59553c008b2 · < 79d09cfe90304ff4f195e47d569800f5e0f8b854| No fix yet |
| Linux Linux |
|
|
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().
From the CVE record · Linux
The Linux kernel DRM subsystem has a race when device registration fails after a minor has been registered. A local userspace process that opened that minor can have an ioctl proceed while the error path tears down device resources.
Engineers running Linux kernels with DRM support should check their kernel versions; affected versions were not specified.