CVE-2026-45976: drm/amdgpu: Fix memory leak in amdgpu_ras_init()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: Fix memory leak in amdgpu_ras_init()
When amdgpu_nbio_ras_sw_init() fails in amdgpu_ras_init(), the function returns directly without freeing the allocated con structure, leading to a memory leak.
Fix this by jumping to the release_con label to properly clean up the allocated memory before returning the error code.
Compile tested only. Issue found using a prototype static analysis tool and code review.
The Linux kernel CVE team has assigned CVE-2026-45976 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf and fixed in 6.6.128 with commit f8a5426652bdadd4a5cb48326d48abbdfebe8153 Issue introduced in 6.4 with commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf and fixed in 6.12.75 with commit c11cd77a18115d2cd3f4b6915c4a537b6042f950 Issue introduced in 6.4 with commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf and fixed in 6.18.14 with commit 2fef8c2ac67e7c1b0409d23653300b134c63e54c Issue introduced in 6.4 with commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf and fixed in 6.19.4 with commit 3f43e7812b30d6b2e850218f9bb1dae60727fcef Issue introduced in 6.4 with commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf and fixed in 7.0 with commit ee41e5b63c8210525c936ee637a2c8d185ce873c
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-45976
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_ras.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/f8a5426652bdadd4a5cb48326d48abbdfebe8153 https://git.kernel.org/stable/c/c11cd77a18115d2cd3f4b6915c4a537b6042f950 https://git.kernel.org/stable/c/2fef8c2ac67e7c1b0409d23653300b134c63e54c https://git.kernel.org/stable/c/3f43e7812b30d6b2e850218f9bb1dae60727fcef https://git.kernel.org/stable/c/ee41e5b63c8210525c936ee637a2c8d185ce873c