{"id":"CVE-2026-23034","state":"PUBLISHED","title":"drm/amdgpu/userq: Fix fence reference leak on queue teardown v2","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu/userq: Fix fence reference leak on queue teardown v2\n\nThe user mode queue keeps a pointer to the most recent fence in\nuserq->last_fence. This pointer holds an extra dma_fence reference.\n\nWhen the queue is destroyed, we free the fence driver and its xarray,\nbut we forgot to drop the last_fence reference.\n\nBecause of the missing dma_fence_put(), the last fence object can stay\nalive when the driver unloads. This leaves an allocated object in the\namdgpu_userq_fence slab cache and triggers\n\nThis is visible during driver unload as:\n\n  BUG amdgpu_userq_fence: Objects remaining on __kmem_cache_shutdown()\n  kmem_cache_destroy amdgpu_userq_fence: Slab cache still has objects\n  Call Trace:\n    kmem_cache_destroy\n    amdgpu_userq_fence_slab_fini\n    amdgpu_exit\n    __do_sys_delete_module\n\nFix this by putting userq->last_fence and clearing the pointer during\namdgpu_userq_fence_driver_free().\n\nThis makes sure the fence reference is released and the slab cache is\nempty when the module exits.\n\nv2: Update to only release userq->last_fence with dma_fence_put()\n    (Christian)\n\n(cherry picked from commit 8e051e38a8d45caf6a866d4ff842105b577953bb)","publishedAt":"2026-01-31T11:42:29.137Z","updatedAt":"2026-05-11T21:58:43.438Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"edc762a51c7181d6fe1e0837e2eb69afb406f98e","status":"affected","lessThan":"e1a30e1ab33fc522785d04bbf7e1b13a5c5c9175","versionType":"git"},{"version":"edc762a51c7181d6fe1e0837e2eb69afb406f98e","status":"affected","lessThan":"b2426a211dba6432e32a2e70e9183c6e134475c6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.7","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c"]}],"references":["https://git.kernel.org/stable/c/e1a30e1ab33fc522785d04bbf7e1b13a5c5c9175","https://git.kernel.org/stable/c/b2426a211dba6432e32a2e70e9183c6e134475c6"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/23xxx/CVE-2026-23034.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-23034","state":"PUBLISHED","datePublished":"2026-01-31T11:42:29.137Z","dateUpdated":"2026-05-11T21:58:43.438Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-01-13T15:37:45.942Z"},"containers":{"cna":{"title":"drm/amdgpu/userq: Fix fence reference leak on queue teardown v2","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu/userq: Fix fence reference leak on queue teardown v2\n\nThe user mode queue keeps a pointer to the most recent fence in\nuserq->last_fence. This pointer holds an extra dma_fence reference.\n\nWhen the queue is destroyed, we free the fence driver and its xarray,\nbut we forgot to drop the last_fence reference.\n\nBecause of the missing dma_fence_put(), the last fence object can stay\nalive when the driver unloads. This leaves an allocated object in the\namdgpu_userq_fence slab cache and triggers\n\nThis is visible during driver unload as:\n\n  BUG amdgpu_userq_fence: Objects remaining on __kmem_cache_shutdown()\n  kmem_cache_destroy amdgpu_userq_fence: Slab cache still has objects\n  Call Trace:\n    kmem_cache_destroy\n    amdgpu_userq_fence_slab_fini\n    amdgpu_exit\n    __do_sys_delete_module\n\nFix this by putting userq->last_fence and clearing the pointer during\namdgpu_userq_fence_driver_free().\n\nThis makes sure the fence reference is released and the slab cache is\nempty when the module exits.\n\nv2: Update to only release userq->last_fence with dma_fence_put()\n    (Christian)\n\n(cherry picked from commit 8e051e38a8d45caf6a866d4ff842105b577953bb)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"edc762a51c7181d6fe1e0837e2eb69afb406f98e","status":"affected","lessThan":"e1a30e1ab33fc522785d04bbf7e1b13a5c5c9175","versionType":"git"},{"version":"edc762a51c7181d6fe1e0837e2eb69afb406f98e","status":"affected","lessThan":"b2426a211dba6432e32a2e70e9183c6e134475c6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.7","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e1a30e1ab33fc522785d04bbf7e1b13a5c5c9175"},{"url":"https://git.kernel.org/stable/c/b2426a211dba6432e32a2e70e9183c6e134475c6"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:58:43.438Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}