| The vulnerability resides in the `drm/amdkfd` module of the Linux kernel, specifically in the `kfd_mem_dmamap_userptr` and `kfd_mem_dmaunmap_userptr` functions. In these functions, memory is allocated for `ttm->sg` using `kmalloc`, but it is not freed properly when unmapping the DMA region. This can lead to a memory leak, as the allocated memory remains unreclaimed. |
| |
| The issue was introduced in kernel version 5.14 with commit 264fb4d332f5 and was fixed in versions 5.14.12 with commit 7e5ce6029b62 and 5.15 with commit b072ef1215ac. The affected file is `drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c`. |
| |
| The recommended mitigation is to update to the latest stable kernel version, which includes this fix along with many other bugfixes. Cherry-picking individual commits is not supported by the Linux kernel community. If updating to the latest release is impossible, the individual changes can be found at the specified commit hashes. |
| |