Vulnerability · Published May 9, 2025 · Assigned by Linux

CVE-2025-37843PCI: pciehp: Avoid unnecessary device replacement check

Medium 5.5

In plain English

A medium-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 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 88.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: PCI: pciehp: Avoid unnecessary device replacement check Hot-removal of nested PCI hotplug ports suffers from a long-standing race condition which can lead to a deadlock: A parent hotplug port acquires pci_lock_rescan_remove(), then waits for pciehp to unbind from a child hotplug port. Meanwhile that child hotplug port tries to acquire pci_lock_rescan_remove() as well in order to remove its own children. The deadlock only occurs if the parent acquires pci_lock_rescan_remove() first, not if the child happens to acquire it first. Several workarounds to avoid the issue have been proposed and discarded over the years, e.g.: https://lore.kernel.org/r/4c882e25194ba8282b78fe963fec8faae7cf23eb.1529173804.git.lukas@wunner.de/ A proper fix is being worked on, but needs more time as it is nontrivial and necessarily intrusive. Recent commit 9d573d19547b ("PCI: pciehp: Detect device replacement during system sleep") provokes more frequent occurrence of the deadlock when removing more than one Thunderbolt device during system sleep. The commit sought to detect device replacement, but also triggered on device removal. Differentiating reliably between replacement and removal is impossible because pci_get_dsn() returns 0 both if the device was removed, as well as if it was replaced with one lacking a Device Serial Number. Avoid the more frequent occurrence of the deadlock by checking whether the hotplug port itself was hot-removed. If so, there's no sense in checking whether its child device was replaced. This works because the ->resume_noirq() callback is invoked in top-down order for the entire hierarchy: A parent hotplug port detecting device replacement (or removal) marks all children as removed using pci_dev_set_disconnected() and a child hotplug port can then reliably detect being removed.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.12.25-1DEBIAN-CVE-2025-37843
Debian:14linux6.12.25-1DEBIAN-CVE-2025-37843
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1024.24UBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-37843
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-37843
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-37843

Affected products (as reported)

VendorProductVersions
Linux Linux 9d573d19547b3fae0c1d4e5fce52bdad3fda3664 – before e4a1d7defbc2d806540720a5adebe24ec34886839d573d19547b3fae0c1d4e5fce52bdad3fda3664 – before 0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f9d573d19547b3fae0c1d4e5fce52bdad3fda3664 – before 7535d10a2c61baeff493300070cf04d9ddda216b9d573d19547b3fae0c1d4e5fce52bdad3fda3664 – before e3260237aaadc9799107ccb940c6688195c4518d
Linux Linux 6.11

References