data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2025-38421 in the interactive tracker

CVE-2025-38421

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

7.8 EPSS 0.2% AV:L

Published 2025-07-25 (15 months ago) by the Linux kernel CNA. Subsystem drivers/platform. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2025-38421 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixievulnerable6.12.113-1No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication.
Debian 14forkyfixed6.16.3-1Update the kernel and reboot. Fixed in 6.16.3-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.16.3-1Update the kernel and reboot. Fixed in 6.16.3-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

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.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/platform/x86/amd/pmf/core.c
drivers/platform/x86/amd/pmf/tee-if.c

What this is
AMD PMF DRIVERMAINTAINERS section matched on drivers/platform/x86/amd/pmf/ · platform-driver-x86@vger.kernel.org · Supported
Kernel module
amd_pmf

Check it on the machine

grep -wE 'CONFIG_AMD_PMF|CONFIG_X86' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w amd_pmf

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian does not build this code in 1 release. It does build it in 3 releases, so the answer depends on which release the machine runs.

  • bookwormn
  • trixieMnot built on amd64/cloud-amd64, arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt/arm64, armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
  • forky, sidMnot built on amd64/cloud-amd64, arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt-arm64, armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
n
not enabled on any flavour - this release does not build the code
M
a module where it is built at all; some flavours do not build it
Build switches
CONFIG_AMD_PMF, CONFIG_X86
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2025-07-25 (15 months ago)source
CVSS
7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
local (AV:L)source
EPSS
0.17%, higher than 5.7% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
drivers/platform

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
6.146.15.40d10b532f861
6.146.16d9db3a941270
6.12.2300
6.13.1100

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:LAttack vector, local
The amd-pmf platform driver is reachable only from the local machine — via driver unbind/module unload, the suspend/resume PM path, or the debugfs `update_policy` handler. There is no network or adjacent-network exposure.
AC:LAttack complexity, low
On an affected system (AMD laptop whose BIOS advertises Smart PC while the PMF TA/policy is unavailable) `amd_pmf_init_smart_pc()` fails deterministically at every boot, leaving `dev->buf`, `dev->policy_buf` and `dev->prev_data` dangling, so the attacker simply triggers unbind or a suspend/resume cycle to hit the double free/UAF with 100% reliability.
PR:LPrivileges required, low
The dangling `pdev->buf` is dereferenced from `amd_pmf_resume_handler()`/`amd_pmf_restore_handler()` and from the re-armed `pb_work` handler, and an unprivileged local user in an active session can initiate suspend/resume through logind; heap grooming to control the reused slab object also needs only unprivileged allocations.
UI:NUser interaction, none
The attacker performs the triggering action themselves (driver unbind/module unload or a suspend/resume cycle); no separate victim needs to be induced into any action.
S:UScope, unchanged
The corrupted memory and the resulting privilege escalation are entirely within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
The stale `dev->buf`/`dev->prev_data` pointers are read after free (`memcpy(&dev->m_table, dev->buf, dev->mtable_size)` in `amd_pmf_get_smu_info()`), leaking reallocated kernel slab contents, and the double free gives the attacker a slab object shared with another subsystem, which is a general kernel-memory read primitive.
I:HIntegrity impact, high
The double free of `dev->buf` (and of `policy_buf`/`prev_data`) lets the same slab object be handed to two owners, and the UAF write paths (`memset(dev->buf, 0, dev->mtable_size)`, `dev->prev_data->spl = val`, plus SMU DMA into the freed page programmed by `amd_pmf_set_dram_addr()`) provide a controlled write into live kernel objects, which is exploitable for control-flow hijack.
A:HAvailability impact, high
A double free triggers immediate slab freelist corruption — a BUG/panic under freelist hardening or CONFIG_SLUB_DEBUG, and unbounded heap corruption leading to a crash otherwise; the UAF accesses from the PM resume path can be repeated to reliably crash the system.