drm/amdgpu: Fix memory leak in amdgpu_ras_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's amdgpu_ras_init() leaks allocated memory if amdgpu_nbio_ras_sw_init() fails. The input does not establish whether an attacker can trigger the failure or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the amdgpu driver should check their versions; affected versions were not provided.