CVE-2025-21780: drm/amdgpu: avoid buffer overflow attach in smu_sys_set_pp_table()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: avoid buffer overflow attach in smu_sys_set_pp_table()
It malicious user provides a small pptable through sysfs and then a bigger pptable, it may cause buffer overflow attack in function smu_sys_set_pp_table().
The Linux kernel CVE team has assigned CVE-2025-21780 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.129 with commit 3484ea33157bc7334f57e64826ec5a4bf992151a Fixed in 6.6.79 with commit e43a8b9c4d700ffec819c5043a48769b3e7d9cab Fixed in 6.12.16 with commit 2498d2db1d35e88a2060ea191ae75dce853dd084 Fixed in 6.13.4 with commit 231075c5a8ea54f34b7c4794687baa980814e6de Fixed in 6.14-rc3 with commit 1abb2648698bf10783d2236a6b4a7ca5e8021699
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-2025-21780
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/pm/swsmu/amdgpu_smu.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/3484ea33157bc7334f57e64826ec5a4bf992151a https://git.kernel.org/stable/c/e43a8b9c4d700ffec819c5043a48769b3e7d9cab https://git.kernel.org/stable/c/2498d2db1d35e88a2060ea191ae75dce853dd084 https://git.kernel.org/stable/c/231075c5a8ea54f34b7c4794687baa980814e6de https://git.kernel.org/stable/c/1abb2648698bf10783d2236a6b4a7ca5e8021699