[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025102810-CVE-2025-40032-a2fd@gregkh>
Date: Tue, 28 Oct 2025 12:48:09 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-40032: PCI: endpoint: pci-epf-test: Add NULL check for DMA channels before release
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
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]
The Linux kernel CVE team has assigned CVE-2025-40032 to this issue.
Affected and fixed versions
===========================
	Issue introduced in 5.7 with commit 5ebf3fc59bd20d17df3ba26159787d13cf20d362 and fixed in 6.1.157 with commit 6411f840a9b5c47c00ca8e004733de232553870d
	Issue introduced in 5.7 with commit 5ebf3fc59bd20d17df3ba26159787d13cf20d362 and fixed in 6.6.113 with commit 0c5ce6b6ccc22d486cc7239ed908cb0ae5363a7b
	Issue introduced in 5.7 with commit 5ebf3fc59bd20d17df3ba26159787d13cf20d362 and fixed in 6.12.54 with commit fb54ffd60064c4e5139a3eb216e877b1acae1c8b
	Issue introduced in 5.7 with commit 5ebf3fc59bd20d17df3ba26159787d13cf20d362 and fixed in 6.17.3 with commit 57f7fb0d1ac28540c0f6405c829bb9c3b89d8dba
	Issue introduced in 5.7 with commit 5ebf3fc59bd20d17df3ba26159787d13cf20d362 and fixed in 6.18-rc1 with commit 85afa9ea122dd9d4a2ead104a951d318975dcd25
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2025-40032
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
	drivers/pci/endpoint/functions/pci-epf-test.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/6411f840a9b5c47c00ca8e004733de232553870d
	https://git.kernel.org/stable/c/0c5ce6b6ccc22d486cc7239ed908cb0ae5363a7b
	https://git.kernel.org/stable/c/fb54ffd60064c4e5139a3eb216e877b1acae1c8b
	https://git.kernel.org/stable/c/57f7fb0d1ac28540c0f6405c829bb9c3b89d8dba
	https://git.kernel.org/stable/c/85afa9ea122dd9d4a2ead104a951d318975dcd25
Powered by blists - more mailing lists
 
