Skip to contentSkip to conversation

CVE-2025-38421: platform/x86/amd: pmf: Use device managed allocations

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 25, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

platform/x86/amd: pmf: Use device managed allocations

If setting up smart PC fails for any reason then this can lead to a double free when unloading amd-pmf. This is because dev->buf was freed but never set to NULL and is again freed in amd_pmf_remove().

To avoid subtle allocation bugs in failures leading to a double free change all allocations into device managed allocations.

The Linux kernel CVE team has assigned CVE-2025-38421 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.14 with commit 5b1122fc4995f308b21d7cfc64ef9880ac834d20 and fixed in 6.15.4 with commit 0d10b532f861253c283863522d59d099fcb0796d
	Issue introduced in 6.14 with commit 5b1122fc4995f308b21d7cfc64ef9880ac834d20 and fixed in 6.16-rc3 with commit d9db3a941270d92bbd1a6a6b54a10324484f2f2d
	Issue introduced in 6.12.23 with commit e70b4b8f93d7fcf8ee063a1d1f18782c4da3d335
	Issue introduced in 6.13.11 with commit 3ed60e51ffdbfef14169bd967e21a6ba5e5ff42b

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-38421

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/platform/x86/amd/pmf/core.c
drivers/platform/x86/amd/pmf/tee-if.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/0d10b532f861253c283863522d59d099fcb0796d
	https://git.kernel.org/stable/c/d9db3a941270d92bbd1a6a6b54a10324484f2f2d