CVE-2024-56753: drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module
This commit addresses an omission in the previous patch related to the cleaner shader support for GFX9 hardware. Specifically, it adds the necessary deinitialization code for the cleaner shader in the gfx_v9_0_sw_fini function.
The added line amdgpu_gfx_cleaner_shader_sw_fini(adev); ensures that any allocated resources for the cleaner shader are freed correctly, avoiding potential memory leaks and ensuring that the GPU state is clean for the next initialization sequence.
The Linux kernel CVE team has assigned CVE-2024-56753 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12 with commit c2e70d307f4491ff970208a41cce84c95771f340 and fixed in 6.12.2 with commit 720c0376b3d29cbab921a60062fda5980742ed9d Issue introduced in 6.12 with commit c2e70d307f4491ff970208a41cce84c95771f340 and fixed in 6.13-rc1 with commit e47cb9d2533200d49dd5364d4a148119492f8a3d
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-2024-56753
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/gfx_v9_0.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/720c0376b3d29cbab921a60062fda5980742ed9d https://git.kernel.org/stable/c/e47cb9d2533200d49dd5364d4a148119492f8a3d