amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.337.0.107.1In 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).
From the CVE record · Linux
The Linux kernel's amd-pstate code leaks an allocated cpudata object when setting EPP fails during CPU initialization. The input does not establish how an attacker could trigger this failure or specify any network, authentication, or user-interaction conditions.
Engineers running Linux kernels with amd-pstate should check whether their kernel is affected; no affected versions are specified.