Vulnerability · Published Jun 18, 2025 · Assigned by Linux
CVE-2025-38069PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2025-38069 |
| Debian:13 | linux | 6.12.32-1 | DEBIAN-CVE-2025-38069 |
| Debian:14 | linux | 6.12.32-1 | DEBIAN-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux | 5.15.0-202.212 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux | 6.8.0-147.147 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux | 6.8.0-147.147 | USN-8917-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1067.70 | USN-8917-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1067.70 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1013.13~24.04.1 | USN-7769-3 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1013.13~24.04.1 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1071.79 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1071.79 | USN-8918-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | USN-8962-1 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1069.76 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1069.76 | USN-8918-1 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.17 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | 6.14.0-1007.7 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1071.79 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1071.79 | USN-8917-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | 6.14.0-1016.17~24.04.1 | USN-7769-1 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | 6.14.0-1016.17~24.04.1 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1066.74 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1066.74 | USN-8917-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1052.56 | USN-8917-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1052.56 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | 6.14.0-32.32~24.04.1 | USN-7769-3 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1067.68 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1067.68 | USN-8917-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-147.147.1 | USN-8917-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-147.147.1 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | USN-8963-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1035.38 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | USN-8963-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1012.12 | USN-7771-1 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1012.12 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1064.67 | USN-8917-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1064.67 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | 6.14.0-1013.13~24.04.1 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | 6.14.0-1013.13~24.04.1 | USN-7789-1 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | 6.14.0-32.32.1~24.04.1 | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-vmware | 6.8.0-1008.8 | UBUNTU-CVE-2025-38069 |
| Ubuntu:24.04:LTS | linux-xilinx | no fix listed | UBUNTU-CVE-2025-38069 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2025-38069 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 349e7a85b25fa6ee82902d9be2cc5f3bec815120 – before e2e43854ab72a9d4908ac2bf6087f80aa138a8b5349e7a85b25fa6ee82902d9be2cc5f3bec815120 – before 761db4ca3a469f2070757acd4e104dff5125ca99349e7a85b25fa6ee82902d9be2cc5f3bec815120 – before fe2329eff5bee461ebcafadb6ca1df0cbf5945fd349e7a85b25fa6ee82902d9be2cc5f3bec815120 – before 8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee349e7a85b25fa6ee82902d9be2cc5f3bec815120 – before 934e9d137d937706004c325fa1474f9e3f1ba10a |
| Linux | Linux | 4.12 |
References
- https://git.kernel.org/stable/c/e2e43854ab72a9d4908ac2bf6087f80aa138a8b5
- https://git.kernel.org/stable/c/761db4ca3a469f2070757acd4e104dff5125ca99
- https://git.kernel.org/stable/c/fe2329eff5bee461ebcafadb6ca1df0cbf5945fd
- https://git.kernel.org/stable/c/8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee
- https://git.kernel.org/stable/c/934e9d137d937706004c325fa1474f9e3f1ba10a