CVE-2023-53816: drm/amdkfd: fix potential kgd_mem UAFs
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: fix potential kgd_mem UAFs
kgd_mem pointers returned by kfd_process_device_translate_handle are only guaranteed to be valid while p->mutex is held. As soon as the mutex is unlocked, another thread can free the BO.
The Linux kernel CVE team has assigned CVE-2023-53816 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.23 with commit 5045360f3bb62ccd4f87202e33489f71f8bbc3fc Fixed in 6.2.10 with commit 5ca14fb5552ac13a2402d306c0bd2379a71610ff Fixed in 6.3 with commit 9da050b0d9e04439d225a2ec3044af70cdfb3933
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-53816
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/5045360f3bb62ccd4f87202e33489f71f8bbc3fc https://git.kernel.org/stable/c/5ca14fb5552ac13a2402d306c0bd2379a71610ff https://git.kernel.org/stable/c/9da050b0d9e04439d225a2ec3044af70cdfb3933