Not scored
drm/amdgpu/userq: Fix fence reference leak on queue teardown v2
- Severity
- Not scored
- Exploit likelihood
- 0.20% (higher than 10% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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)
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from edc762a51c7181d6fe1e0837e2eb69afb406f98e before e1a30e1ab33fc522785d04bbf7e1b13a5c5c9175, from edc762a51c7181d6fe1e0837e2eb69afb406f98e before b2426a211dba6432e32a2e70e9183c6e134475c6, 6.16 Not affected: before 6.16, from 6.18.7 up to 6.18.*, from 6.19 up to * | CVE List |
What each source says
CVE List
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)
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: drm/amdgpu/userq: Solución a la fuga de referencia de 'fence' durante el desmontaje de la cola v2 La cola en modo usuario mantiene un puntero al 'fence' más reciente en userq->last_fence. Este puntero mantiene una referencia extra de dma_fence. Cuando la cola es destruida, liberamos el controlador de 'fence' y su xarray, pero olvidamos liberar la referencia de last_fence. Debido a la ausencia de dma_fence_put(), el último objeto 'fence' puede permanecer activo cuando el controlador se descarga. Esto deja un objeto asignado en la caché de 'slab' amdgpu_userq_fence y desencadena Esto es visible durante la descarga del controlador como: BUG amdgpu_userq_fence: Objetos restantes en __kmem_cache_shutdown() kmem_cache_destroy amdgpu_userq_fence: La caché de 'slab' todavía tiene objetos Traza de Llamada: kmem_cache_destroy amdgpu_userq_fence_slab_fini amdgpu_exit __do_sys_delete_module Solucione esto liberando userq->last_fence y limpiando el puntero durante amdgpu_userq_fence_driver_free(). Esto asegura que la referencia de 'fence' sea liberada y que la caché de 'slab' esté vacía cuando el módulo sale. v2: Actualización para liberar solo userq->last_fence con dma_fence_put() (Christian) (seleccionado del commit 8e051e38a8d45caf6a866d4ff842105b577953bb)
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23034 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2026-23034 changed 2026-06-17 | Public domain |