CVE-2026-99620: drm/amdgpu: don't walk the CS chunks when allocating them failed
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: don't walk the CS chunks when allocating them failed
amdgpucspass1() sets p->nchunks before allocating p->chunks, and the allocation failure path skips resetting it. amdgpucsparserfini() then frees the kdata of nchunks chunks from a NULL array. On navi48 with the chunk array allocation failed through failslab:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] RIP: 0010:amdgpucsparserfini+0x35d/0x710 [amdgpu] amdgpucsioctl+0xcae/0x7a20 [amdgpu] drmioctlkernel+0x180/0x320 [drm]
Set nchunks once the array exists.
(cherry picked from commit 0c828445757b86aaa3ed2638832d76f450022bdf)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 0c828445757b86aaa3ed2638832d76f450022bdf
Frequently Asked Questions
What condition is required to trigger the crash?
The CS chunk array allocation must fail after amdgpu_cs_pass1() has set the chunk count. Cleanup then attempts to free chunk data through a NULL array, resulting in a null-pointer dereference.
Which systems are realistically exposed?
Systems using the Linux amdgpu driver and processing the affected command-submission path are exposed when the chunk-array allocation fails. The reported reproduction was on Navi48 with allocation failure injected through failslab.
How can I tell whether this issue has been fixed?
The fix sets the chunk count only after the chunk array has been successfully allocated. The referenced upstream commit is 0c828445757b86aaa3ed2638832d76f450022bdf.