drm/amdgpu: reject mapping a reserved doorbell to a new queue
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/amdgpu: reject mapping a reserved doorbell to a new queue
When creating an user-queue, the user space provides a doorbell BO handle and an offset within the bo to obtain a doorbell.
However current implementation using xa_store_irq() to store a doorbell, which allows a later queue created with the same BO and offset parameters to overwrite an existing queue and doorbell mapping.
This can cause problems like misrouting fence IRQ processing to a wrong queue, and mislead the cleanup process of one queue erasing the mapping of another queue.
This commit fixes this issue by replacing xa_store_irq with xa_insert_irq, which rejects mapping a reserved doorbell to a newly created queue
(cherry picked from commit 6244eae22966350db52faf9c1369d3b2ffc5de4e)
From the CVE record · Linux
The drm/amdgpu user-queue code can allow a new queue to overwrite an existing doorbell mapping when user space supplies the same doorbell buffer handle and offset. A local user-space process creating queues can cause fence interrupts to be routed to the wrong queue or cause one queue's cleanup to erase another queue's mapping.
Engineers running Linux kernels with the drm/amdgpu user-queue code should check their kernel; affected versions were not provided.