CVE-2026-99632: drm/amdkfd: use the queue's process info for the WPTR BO eviction fence
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: use the queue's process info for the WPTR BO eviction fence
amdgpu_amdkfd_map_gtt_bo_to_gart() removes the eviction fence of bo->vm_bo->vm->process_info from the WPTR BO of a new queue. bo->vm_bo is the VM which opened the BO last, not necessarily the KFD process' VM, and a render node VM has no process info.
On navi31, an unprivileged process which exports its WPTR BO with AMDKFD_IOC_EXPORT_DMABUF and imports it on a second render node fd oopses in AMDKFD_IOC_CREATE_QUEUE:
BUG: kernel NULL pointer dereference, address: 0000000000000060 RIP: 0010:amdgpu_amdkfd_map_gtt_bo_to_gart+0x86/0x1a0 [amdgpu] init_user_queue.part.0+0x180/0x250 [amdgpu] pqm_create_queue+0x32d/0x730 [amdgpu] kfd_ioctl_create_queue+0x583/0x9f0 [amdgpu]
Pass the process info of the queue instead. With the fix, the queue is created and destroyed normally.
(cherry picked from commit 6b4157498a176bd1c6083f6bb5aaf8a257a2027e)
The Linux kernel CVE team has assigned CVE-2026-99632 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.3 with commit 7f347e3f821743a02c249abe50e467a333fabcfe and fixed in 6.18.64 with commit c964cd06eb35d2ca2d9b49a7423b5d5cd01441c0 Issue introduced in 6.3 with commit 7f347e3f821743a02c249abe50e467a333fabcfe and fixed in 7.3.5 with commit 3044e6e19f5746d2c279d0105fd61e759bcb42b3 Issue introduced in 6.3 with commit 7f347e3f821743a02c249abe50e467a333fabcfe and fixed in 7.4-rc2 with commit da2897ee8b811945fd40ecc4aaf03291c14ce61c
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-2026-99632
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/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.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/c964cd06eb35d2ca2d9b49a7423b5d5cd01441c0 https://git.kernel.org/stable/c/3044e6e19f5746d2c279d0105fd61e759bcb42b3 https://git.kernel.org/stable/c/da2897ee8b811945fd40ecc4aaf03291c14ce61c