drm/amdgpu: reject oversized IBs with per-ring packet limits
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d38ceaf99ed015f2a0b9af3499791bd3a3daae21 · < fd37f9dd5b5ab70a46fa7bc76623c0528d602b27| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: reject oversized IBs with per-ring packet limits
On GFX rings, amdgpu_cs_p2_ib() passed user-supplied ib_bytes through to ib->length_dw without a limit, while ring_emit_ib() encodes length into packet fields. Oversized values can corrupt adjacent control bits and destabilize command submission.
Add a per-ring IB packet size limit helper and reject command submissions exceeding the corresponding dword limit before IB allocation. Use the documented 20-bit limit for GFX/compute/SDMA/VPE, and apply the MM fallback limit for other ring types.
(cherry picked from commit 7f48fa2cf62e3fa6c9c3870aa74988f773247e52)
From the CVE record · Linux
The Linux kernel's amdgpu driver did not limit user-supplied indirect buffer sizes before encoding them in GFX ring packets. A local user able to submit GPU commands could supply an oversized buffer, corrupt adjacent packet control bits, and destabilize command submission. The input does not specify authentication requirements or any additional user interaction.
Anyone running Linux with the amdgpu driver should check their kernel version; affected versions are not specified.