drm/amdgpu: fix ACP MFD device leak on init failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 25030321ba2860c56651429a4f28d94a6483d952 · < 587469076e4ffb617f7ad1a0c4a13072a3e87113| No fix yet |
| Linux Linux |
|
|
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)
From the CVE record · Linux
The Linux kernel’s amdgpu ACP initialization can leave child devices registered if power-domain attachment fails or a reset or clock operation times out. The input describes a resource leak but does not identify an attacker action, access requirement, or user interaction.
Engineers running Linux kernels with amdgpu ACP support should check their kernel versions; affected versions are not specified.