CVE-2026-98779: drm/amdgpu: fix ACP MFD device leak on init failure
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix ACP MFD device leak on init failure
acp_hw_init() registers ACP child devices with mfd_add_devices() before attaching them to the ACP power domain and initializing the hardware.
If attaching a child to the power domain fails, or if the ACP reset or clock enable operation times out, the failure path frees only the source cell, resource, and platform-data allocations. The child platform devices already registered by mfd_add_devices() remain registered and are never released.
Remove the children from the power domain and unregister the MFD devices on failures that occur after mfd_add_devices() succeeds. Keep mfd_add_devices() failures on the existing cleanup path since the MFD core already rolls back partially registered children itself.
The issue was identified by a static analysis tool I developed and confirmed by manual review.
(cherry picked from commit 63da68d6a2279ec945581c990c5a59a5ae8b5560)
The Linux kernel CVE team has assigned CVE-2026-98779 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.6 with commit 25030321ba2860c56651429a4f28d94a6483d952 and fixed in 6.12.113 with commit 2b9a53940a2bc063ea4cd09ee49220a503a0170c Issue introduced in 4.6 with commit 25030321ba2860c56651429a4f28d94a6483d952 and fixed in 6.18.56 with commit 587469076e4ffb617f7ad1a0c4a13072a3e87113 Issue introduced in 4.6 with commit 25030321ba2860c56651429a4f28d94a6483d952 and fixed in 7.2.10 with commit abf854513bc19e6e24d45353ac99ec5627ee0acc Issue introduced in 4.6 with commit 25030321ba2860c56651429a4f28d94a6483d952 and fixed in 7.3-rc6 with commit f0013046151b7467e62c471c1c83d63ea255799c
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-98779
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_acp.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/2b9a53940a2bc063ea4cd09ee49220a503a0170c https://git.kernel.org/stable/c/587469076e4ffb617f7ad1a0c4a13072a3e87113 https://git.kernel.org/stable/c/abf854513bc19e6e24d45353ac99ec5627ee0acc https://git.kernel.org/stable/c/f0013046151b7467e62c471c1c83d63ea255799c