CVE-2026-53121: amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()
On failure to set the epp, the function amd_pstate_epp_cpu_init() returns with an error code without freeing the cpudata object that was allocated at the beginning of the function.
Ensure that the cpudata object is freed before returning from the function.
This memory leak was discovered by Claude Opus 4.6 with the aid of Chris Mason's AI review-prompts
(https://github.com/masoncl/review-prompts/tree/main/kernel).
The Linux kernel CVE team has assigned CVE-2026-53121 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit f9a378ff6443cdcd4387e5dbb76fa5fa549a83ec and fixed in 6.18.33 with commit 539aabbab190825c77eb455ec35652cb3720625f Issue introduced in 6.14 with commit f9a378ff6443cdcd4387e5dbb76fa5fa549a83ec and fixed in 7.0.10 with commit 7f9aa2359742eaa6ea65ec0d20dafdfd0add9b8b Issue introduced in 6.14 with commit f9a378ff6443cdcd4387e5dbb76fa5fa549a83ec and fixed in 7.1 with commit beda3b363546a423e4e29a7395e04c0ac4ff677e
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-53121
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/cpufreq/amd-pstate.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/539aabbab190825c77eb455ec35652cb3720625f https://git.kernel.org/stable/c/7f9aa2359742eaa6ea65ec0d20dafdfd0add9b8b https://git.kernel.org/stable/c/beda3b363546a423e4e29a7395e04c0ac4ff677e