CVE-2026-142972: drm/amdgpu: fix the error handling of amdgpu_vm_init_entities()
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix the error handling of amdgpuvminitentities()
When initializing the immediate entity fails, amdgpuvminitentities() destroys that entity which was never set up, and when initializing the delayed entity fails, it returns without destroying the immediate one.
On navi48, with the allocation of the immediate entity's scheduler list failing through failslab while opening the render node:
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:dorawspinlock+0x7b/0x280 rawspinlock+0x3c/0x50 drmschedrqremoveentity+0x90/0x2a0 [gpusched] drmschedentitykill+0x86/0x5a0 [gpusched] drmschedentityfini+0x23/0x270 [gpusched] drmschedentitydestroy+0x24/0x30 [gpusched] amdgpuvminitentities+0xc7/0x100 [amdgpu] amdgpuvminit+0x5d1/0x1480 [amdgpu] amdgpudriveropenkms+0x2b1/0xd10 [amdgpu]
Only destroy the immediate entity once it exists and the delayed one failed.
(cherry picked from commit 2f538f57501a71baeb7116ff7485f9a7025e4fb9)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 2f538f57501a71baeb7116ff7485f9a7025e4fb9
Event History
Frequently Asked Questions
What operation can trigger the failure?
The reported failure occurs while opening the AMDGPU render node when initialization of the immediate entity fails, such as when allocation of that entity's scheduler list fails. The example was observed on Navi48 with failslab-induced allocation failure.
What are the consequences of the two initialization failure paths?
If immediate-entity initialization fails, the vulnerable error path can destroy an entity that was never set up, leading to the reported kernel Oops. If delayed-entity initialization fails after immediate initialization succeeds, the prior behavior returns without destroying the immediate entity.