drm/xe/client: add missing bo locking in show_meminfo()
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/client: add missing bo locking in show_meminfo()
bo_meminfo() wants to inspect bo state like tt and the ttm resource, however this state can change at any point leading to stuff like NPD and UAF, if the bo lock is not held. Grab the bo lock when calling bo_meminfo(), ensuring we drop any spinlocks first. In the case of object_idr we now also need to hold a ref.
v2 (MattB) - Also add xe_bo_assert_held()
(cherry picked from commit 4f63d712fa104c3ebefcb289d1e733e86d8698c7)
From the CVE record · Linux
The Linux kernel's drm/xe show_meminfo() path inspected buffer-object state without holding the required lock. If that state changes concurrently, the path can encounter a null-pointer dereference or use-after-free. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with the drm/xe driver should check whether their kernel includes the fix; affected versions are not specified.