CVE-2026-23034
Description
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/userq: Fix fence reference leak on queue teardown v2
The user mode queue keeps a pointer to the most recent fence in userq->last_fence. This pointer holds an extra dma_fence reference.
When the queue is destroyed, we free the fence driver and its xarray, but we forgot to drop the last_fence reference.
Because of the missing dma_fence_put(), the last fence object can stay alive when the driver unloads. This leaves an allocated object in the amdgpu_userq_fence slab cache and triggers
This is visible during driver unload as:
BUG amdgpu_userq_fence: Objects remaining on __kmem_cache_shutdown() kmem_cache_destroy amdgpu_userq_fence: Slab cache still has objects Call Trace: kmem_cache_destroy amdgpu_userq_fence_slab_fini amdgpu_exit __do_sys_delete_module
Fix this by putting userq->last_fence and clearing the pointer during amdgpu_userq_fence_driver_free().
This makes sure the fence reference is released and the slab cache is empty when the module exits.
v2: Update to only release userq->last_fence with dma_fence_put() (Christian)
(cherry picked from commit 8e051e38a8d45caf6a866d4ff842105b577953bb)
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing dma_fence_put() in the Linux kernel's amdgpu user queue teardown causes a fence reference leak, leading to a slab cache BUG on driver unload.
Vulnerability
Overview
The vulnerability resides in the Linux kernel's AMDGPU DRM driver, specifically in the user mode queue (userq) fence management. When a user queue is destroyed, the driver frees the fence driver and its associated xarray, but fails to release the extra reference held by userq->last_fence. This pointer retains a reference to the most recent dma_fence object, and the missing dma_fence_put() call means the fence object remains alive even after the driver unloads.
Exploitation and
Impact
This is a memory management bug that manifests during driver unload. The leaked fence object remains allocated in the amdgpu_userq_fence slab cache, causing a kernel BUG when the slab cache is destroyed. The error message "Objects remaining on __kmem_cache_shutdown()" indicates that the cache is not empty, preventing clean module removal. While this does not directly allow arbitrary code execution, it can be used to cause a denial of service by preventing the amdgpu module from unloading, potentially leading to system instability or requiring a reboot.
Mitigation
The fix, Patch, and References
The fix, introduced in commit 8e051e38a8d45caf6a866d4ff842105b577953bb and backported to the stable kernel, adds a dma_fence_put() call in amdgpu_userq_fence_driver_free() to release the last_fence reference and clears the pointer. This ensures the slab cache is empty on module exit. The patch is included in the stable kernel tree [1]. Users should update to a kernel version containing this fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
2News mentions
0No linked articles in our index yet.