drm/xe/guc_submit: add missing locking in wedged_fini
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/guc_submit: add missing locking in wedged_fini
Any non-wedged queue can have a zero refcount here and can be running concurrently with an async queue destroy, therefore dereferencing the queue ptr to check wedge status after the lookup can trigger UAF if queue is not wedged. Fix this by keeping the submission_state lock held around the check to postpone the free and make the check safe, before dropping again around the put() to avoid the deadlock.
(cherry picked from commit d28af0b6b9580b9f90c265a7da0315b0ad20bbfd)
From the CVE record · Linux
A missing lock in the Linux kernel’s drm/xe/guc_submit code can cause a use-after-free when a non-wedged queue with a zero reference count is checked during a concurrent asynchronous queue destroy. The input does not specify the access or interaction needed to trigger this condition.
Engineers running Linux kernels with the affected drm/xe/guc_submit code should check their deployments; affected versions are not specified.