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

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

CVE-2025-38069

PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops

EPSS 0.2%

Published 2025-06-18 (16 months ago) by the Linux kernel CNA. Subsystem drivers/pci. Debian urgency: not yet assigned.

Debian does not build this code. The per-release build detail is under "Where it lives" below.

What to do, per Debian release

Debian's own status for CVE-2025-38069 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 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.12.32-1Update the kernel and reboot. Fixed in 6.12.32-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.32-1Update the kernel and reboot. Fixed in 6.12.32-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.32-1Update the kernel and reboot. Fixed in 6.12.32-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

Fix a kernel oops found while testing the stm32_pcie Endpoint driver with handling of PERST# deassertion: During EP initialization, pci_epf_test_alloc_space() allocates all BARs, which are further freed if epc_set_bar() fails (for instance, due to no free inbound window). However, when pci_epc_set_bar() fails, the error path: pci_epc_set_bar() -> pci_epf_free_space() does not clear the previous assignment to epf_test->reg[bar]. Then, if the host reboots, the PERST# deassertion restarts the BAR allocation sequence with the same allocation failure (no free inbound window), creating a double free situation since epf_test->reg[bar] was deallocated and is still non-NULL. Thus, make sure that pci_epf_alloc_space() and pci_epf_free_space() invocations are symmetric, and as such, set epf_test->reg[bar] to NULL when memory is freed. [kwilczynski: commit log]

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/pci/endpoint/functions/pci-epf-test.c

What this is
PCI ENDPOINT SUBSYSTEMMAINTAINERS section matched on drivers/pci/endpoint/ · linux-pci@vger.kernel.org · Supported
Kernel module
none to look for. The file would have gone into pci_epf_test, and Debian does not compile it into that module, so finding pci_epf_test in lsmod would say nothing about this CVE.

Check it on the machine

grep -wE 'CONFIG_PCI_ENDPOINT|CONFIG_PCI_EPF_TEST' /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.

Show whether Debian builds this, per release

Debian does not build this code. In 4 releases below, every kernel flavour Debian publishes has the switch off, so the vulnerable file is compiled into no kernel binary Debian ships.

  • bookworm, trixie, forky, sidn
n
not enabled on any flavour - this release does not build the code
Build switches
CONFIG_PCI_ENDPOINT, CONFIG_PCI_EPF_TEST
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-06-18 (16 months ago)source
CVSS
no vector published, unrated
Attack vector
not published
EPSS
0.18%, higher than 7.4% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
drivers/pci

Upstream fixes

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

IntroducedFixed inCommit
4.126.12.31fe2329eff5be
4.126.14.98b83893d1f6c
4.126.15934e9d137d93

Why the CNA scored it this way

The kernel CNA published no CVSS vector and no reasoning for CVE-2025-38069, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.