CVE-2025-40032: PCI: endpoint: pci-epf-test: Add NULL check for DMA channels before release
In the Linux kernel, the following vulnerability has been resolved:
PCI: endpoint: pci-epf-test: Add NULL check for DMA channels before release
The fields dma_chan_tx and dma_chan_rx of the struct pci_epf_test can be
NULL even after EPF initialization. Then it is prudent to check that
they have non-NULL values before releasing the channels. Add the checks
in pci_epf_test_clean_dma_chan().
Without the checks, NULL pointer dereferences happen and they can lead
to a kernel panic in some cases:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000050
Call trace:
dma_release_channel+0x2c/0x120 (P)
pci_epf_test_epc_deinit+0x94/0xc0 [pci_epf_test]
pci_epc_deinit_notify+0x74/0xc0
tegra_pcie_ep_pex_rst_irq+0x250/0x5d8
irq_thread_fn+0x34/0xb8
irq_thread+0x18c/0x2e8
kthread+0x14c/0x210
ret_from_fork+0x10/0x20
[mani: trimmed the stack trace]
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue can crash systems in a specific PCI endpoint test driver path. If DMA channels are missing, cleanup can dereference a NULL pointer, causing a kernel panic in some cases. The bundle does not show active exploitation or broad remote exposure.
Executive priority
Treat as a targeted kernel stability issue. Prioritize affected systems that use PCI endpoint test functionality, embedded platforms, or lab infrastructure where unexpected kernel panics could disrupt operations.
Technical view
The flaw is in pci-epf-test cleanup. dma_chan_tx and dma_chan_rx may remain NULL after EPF initialization, but pci_epf_test_clean_dma_chan() released them without checking. Stable fixes add NULL checks before dma_release_channel(), preventing NULL pointer dereference during endpoint controller deinitialization.
Likely exposure
Exposure is most likely on Linux systems using affected kernel versions with the PCI endpoint test function enabled or loaded. Systems not using PCI endpoint functionality or this test driver are less likely exposed, based on the provided sources.
Exploitation context
CISA KEV status is false in the bundle. No cited source reports exploitation in the wild. The described impact is a kernel NULL pointer dereference and possible panic during driver or endpoint deinitialization, not confirmed code execution.
Researcher notes
Evidence supports a NULL dereference in a specific Linux kernel PCI endpoint test cleanup path. The bundle lacks CVSS, CWE, exploitability analysis, and vendor-specific package mapping, so exposure assessment should be tied to kernel configuration and backports.
Mitigation direction
Apply Linux stable updates containing the referenced NULL-check fixes.
Check distribution or vendor kernel advisories for backported fixes.
Review whether pci-epf-test is enabled, loaded, or needed.
If updates are delayed, follow vendor guidance for exposure reduction.
Validation and detection
Confirm the running kernel includes the relevant stable fix or vendor backport.
Verify pci_epf_test_clean_dma_chan() checks DMA channel pointers before release.
Inventory systems with PCI endpoint test functionality enabled or loaded.
Review kernel logs for matching NULL pointer dereference or panic traces.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40032 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
6Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Oct 28, 2025, 11:48 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.