CVE-2026-31594: PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown
epf_ntb_epc_destroy() duplicates the teardown that the caller is supposed to perform later. This leads to an oops when .allow_link fails or when .drop_link is performed. The following is an example oops of the former case:
Unable to handle kernel paging request at virtual address dead000000000108 [...] [dead000000000108] address between user and kernel address ranges Internal error: Oops: 0000000096000044 [#1] SMP [...] Call trace: pci_epc_remove_epf+0x78/0xe0 (P) pci_primary_epc_epf_link+0x88/0xa8 configfs_symlink+0x1f4/0x5a0 vfs_symlink+0x134/0x1d8 do_symlinkat+0x88/0x138 __arm64_sys_symlinkat+0x74/0xe0 [...]
Remove the helper, and drop pci_epc_put(). EPC device refcounting is tied to the configfs EPC group lifetime, and pci_epc_put() in the .drop_link path is sufficient.
The Linux kernel CVE team has assigned CVE-2026-31594 to this issue.
Affected and fixed versions
===========================
Fixed in 6.18.24 with commit cec9ead73ab154a7953f6ab8dd5127e0d6bbf95a Fixed in 6.19.14 with commit 478e776101592eb63298714e96823ef78a3295ec Fixed in 7.0.1 with commit a7a3cab4d33fd8a8aed864c447d0d7c99e85404e
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-2026-31594
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-vntb.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/cec9ead73ab154a7953f6ab8dd5127e0d6bbf95a https://git.kernel.org/stable/c/478e776101592eb63298714e96823ef78a3295ec https://git.kernel.org/stable/c/a7a3cab4d33fd8a8aed864c447d0d7c99e85404e https://git.kernel.org/stable/c/0da63230d3ec1ec5fcc443a2314233e95bfece54