Skip to content
Fencer Vulns
high 7.8

CVE-2025-38069 json

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

published 2025-06-18 16 mo ago modified 2026-10-30 10 d ago also EUVD-2025-18584

cvss
7.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 13%
public exploits
0
none known

Summary

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

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

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]

Patch / fix

  • Linux Linux 6.1.191, 6.6.160, 6.12.31, 6.14.9, 6.15
  • linux Debian 14, Debian 13 6.12.32-1

debian advisories DEBIAN-CVE-2025-38069

  • linux Ubuntu 24.04 LTS 6.8.0-147.147
  • linux-aws Ubuntu 22.04 LTS 5.15.0-1119.126
  • linux-aws Ubuntu 24.04 LTS 6.8.0-1067.70
  • linux-gcp Ubuntu 22.04 LTS 5.15.0-1120.130
  • linux-gcp Ubuntu 24.04 LTS 6.8.0-1071.79
  • linux-gke Ubuntu 22.04 LTS 5.15.0-1115.121
  • linux-gke Ubuntu 24.04 LTS 6.8.0-1066.74
  • linux-ibm Ubuntu 22.04 LTS 5.15.0-1113.117

ubuntu advisories UBUNTU-CVE-2025-38069

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-38069 updated

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

  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernel
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.23% chance of exploitation in the next 30 days, higher than 13% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.