{"id":"CVE-2023-53816","state":"PUBLISHED","title":"drm/amdkfd: fix potential kgd_mem UAFs","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: fix potential kgd_mem UAFs\n\nkgd_mem pointers returned by kfd_process_device_translate_handle are\nonly guaranteed to be valid while p->mutex is held. As soon as the mutex\nis unlocked, another thread can free the BO.","publishedAt":"2025-12-09T00:01:14.166Z","updatedAt":"2026-10-15T21:41:36.576Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"5045360f3bb62ccd4f87202e33489f71f8bbc3fc","versionType":"git"},{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"5ca14fb5552ac13a2402d306c0bd2379a71610ff","versionType":"git"},{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"9da050b0d9e04439d225a2ec3044af70cdfb3933","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_chardev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.19","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.10","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","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/amdkfd/kfd_chardev.c"]}],"references":["https://git.kernel.org/stable/c/5045360f3bb62ccd4f87202e33489f71f8bbc3fc","https://git.kernel.org/stable/c/5ca14fb5552ac13a2402d306c0bd2379a71610ff","https://git.kernel.org/stable/c/9da050b0d9e04439d225a2ec3044af70cdfb3933"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53816.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53816","state":"PUBLISHED","datePublished":"2025-12-09T00:01:14.166Z","dateUpdated":"2026-10-15T21:41:36.576Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-08T23:58:35.277Z"},"containers":{"cna":{"title":"drm/amdkfd: fix potential kgd_mem UAFs","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: fix potential kgd_mem UAFs\n\nkgd_mem pointers returned by kfd_process_device_translate_handle are\nonly guaranteed to be valid while p->mutex is held. As soon as the mutex\nis unlocked, another thread can free the BO."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"5045360f3bb62ccd4f87202e33489f71f8bbc3fc","versionType":"git"},{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"5ca14fb5552ac13a2402d306c0bd2379a71610ff","versionType":"git"},{"version":"4a488a7ad71401169cecee75dc94bcce642e2c53","status":"affected","lessThan":"9da050b0d9e04439d225a2ec3044af70cdfb3933","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_chardev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.19","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.10","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","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/amdkfd/kfd_chardev.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5045360f3bb62ccd4f87202e33489f71f8bbc3fc"},{"url":"https://git.kernel.org/stable/c/5ca14fb5552ac13a2402d306c0bd2379a71610ff"},{"url":"https://git.kernel.org/stable/c/9da050b0d9e04439d225a2ec3044af70cdfb3933"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached through ioctls (AMDKFD_IOC_MAP_MEMORY_TO_GPU / UNMAP_MEMORY_FROM_GPU raced against FREE_MEMORY_OF_GPU) on the /dev/kfd character device, requiring local access to the system. There is no network or remote-peer input path into kfd_chardev.c.\nAC:L - The attacker controls both sides of the race entirely — two threads of their own process issuing concurrent ioctls — and can set the user-supplied args->n_success equal to n_devices to skip the mapping loop so the concurrent free is not rejected with -EBUSY. The window is further made near-deterministic because the victim thread blocks on mutex_lock(&mem->lock) which the freeing thread holds, so it is woken onto memory that has already been mutex_destroy()'d and kfree()'d.\nPR:L - The map/unmap/free memory ioctls are defined with flags 0 — no capability check whatsoever; the only requirement is an open fd on /dev/kfd, which distro/ROCm udev rules grant to ordinary local users (mode 0666, render/video group, or uaccess for the seat user) on any AMD GPU workstation or GPU-compute node. No root, CAP_SYS_ADMIN, or CAP_CHECKPOINT_RESTORE is needed.\nUI:N - The attacker's own process performs all steps (allocate BO, then race map/unmap against free) with no action by any other user. No victim interaction is involved.\nS:U - The use-after-free corrupts kernel heap memory and is exploited within the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed. Standard local kernel privilege escalation stays Unchanged.\nC:H - The freed kgd_mem lives in a generic kmalloc cache and can be resprayed with attacker-controlled data, after which amdgpu_sync_clone() walks mem->sync.fences and dereferences attacker-supplied pointers, giving an arbitrary kernel-memory read primitive and, via full control-flow hijack, disclosure of all kernel memory.\nI:H - The UAF yields writes into the freed slab (mutex_lock owner field, dma_fence_get refcount increments at attacker-chosen addresses) and an indirect call through a forged dma_fence_ops->signaled/->wait pointer, which is a control-flow hijack primitive enabling arbitrary kernel code execution and privilege escalation.\nA:H - Even without successful exploitation, operating on a kfree()'d object with a mutex_destroy()'d lock and walking its stale fence hashtable reliably produces kernel oopses/panics, and the attacker can trigger it repeatedly at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:16:10.458Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.1.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.2.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-53816","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:37:25.241793Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:41:36.576Z"}}]}}}