AZL-117367: CVE-2026-99873 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: tear down KFD processes before early finisw on disconnect
On surprise removal, amdgpudevicefinihw() calls amdgpuamdkfddevicefinisw() when pcidevisdisconnected() is true. finisw frees kfd.dev, but KFD processes may still be alive and hold references to it: kfdprocessdestroy() dereferences kfd.dev via kfdprocessesremove(), and svmrangelistfini() / kfdprocessfreeoutstandingkfdbos() touch per-device SVM state.
The kfdprocessescount wait only happens later in kgd2kfdteardownprocesses(), called from the top-half remove path well after finisw. In the observed failure the killed KFD process (SIGBUS on unplug) stuck in D state on its exit path, so kfdprocessescount never drained and the PCIe removal thread wedged permanently in condresched(), producing soft-lockup and hung-task splats.
Tear KFD processes down before freeing kfd.dev on the disconnect path, and guard kgd2kfdteardownprocesses() against kfd.dev already being gone when it runs a second time.
(cherry picked from commit 836f44ba87ed7b1d83e2b7bfc788f8c6437b03a7)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 836f44ba87ed7b1d83e2b7bfc788f8c6437b03a7
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The issue occurs on surprise removal or disconnect of an AMD GPU PCIe device while AMD KFD processes remain alive and still reference the device. Affected processes may be killed with SIGBUS during unplug but can become stuck while exiting.
What is the operational impact if the issue is triggered?
The PCIe removal thread can wedge permanently while waiting for KFD processes to drain. This can produce soft-lockup and hung-task reports and prevent clean completion of device removal.
How can I recognize that a system may be affected?
Look for a surprise GPU removal followed by a KFD process stuck in D state during exit, a kfd_processes_count that does not drain, and soft-lockup or hung-task splats associated with the PCIe removal path.
What change resolves the problem?
The fix tears down KFD processes before freeing kfd.dev on the disconnected-device path. It also prevents a later second teardown from operating after kfd.dev has already been freed.