CVE-2025-37843 (GCVE-0-2025-37843)
Vulnerability from cvelistv5
Published
2025-05-09 06:41
Modified
2025-05-26 05:22
Severity ?
VLAI Severity ?
EPSS score ?
Summary
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.
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/pci/hotplug/pciehp_core.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "e4a1d7defbc2d806540720a5adebe24ec3488683", "status": "affected", "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664", "versionType": "git" }, { "lessThan": "0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f", "status": "affected", "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664", "versionType": "git" }, { "lessThan": "7535d10a2c61baeff493300070cf04d9ddda216b", "status": "affected", "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664", "versionType": "git" }, { "lessThan": "e3260237aaadc9799107ccb940c6688195c4518d", "status": "affected", "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/pci/hotplug/pciehp_core.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "6.11" }, { "lessThan": "6.11", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.12.*", "status": "unaffected", "version": "6.12.24", "versionType": "semver" }, { "lessThanOrEqual": "6.13.*", "status": "unaffected", "version": "6.13.12", "versionType": "semver" }, { "lessThanOrEqual": "6.14.*", "status": "unaffected", "version": "6.14.3", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.15", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.12.24", "versionStartIncluding": "6.11", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.13.12", "versionStartIncluding": "6.11", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.14.3", "versionStartIncluding": "6.11", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.15", "versionStartIncluding": "6.11", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: pciehp: Avoid unnecessary device replacement check\n\nHot-removal of nested PCI hotplug ports suffers from a long-standing race\ncondition which can lead to a deadlock: A parent hotplug port acquires\npci_lock_rescan_remove(), then waits for pciehp to unbind from a child\nhotplug port. Meanwhile that child hotplug port tries to acquire\npci_lock_rescan_remove() as well in order to remove its own children.\n\nThe deadlock only occurs if the parent acquires pci_lock_rescan_remove()\nfirst, not if the child happens to acquire it first.\n\nSeveral workarounds to avoid the issue have been proposed and discarded\nover the years, e.g.:\n\nhttps://lore.kernel.org/r/4c882e25194ba8282b78fe963fec8faae7cf23eb.1529173804.git.lukas@wunner.de/\n\nA proper fix is being worked on, but needs more time as it is nontrivial\nand necessarily intrusive.\n\nRecent commit 9d573d19547b (\"PCI: pciehp: Detect device replacement during\nsystem sleep\") provokes more frequent occurrence of the deadlock when\nremoving more than one Thunderbolt device during system sleep. The commit\nsought to detect device replacement, but also triggered on device removal.\nDifferentiating reliably between replacement and removal is impossible\nbecause pci_get_dsn() returns 0 both if the device was removed, as well as\nif it was replaced with one lacking a Device Serial Number.\n\nAvoid the more frequent occurrence of the deadlock by checking whether the\nhotplug port itself was hot-removed. If so, there\u0027s no sense in checking\nwhether its child device was replaced.\n\nThis works because the -\u003eresume_noirq() callback is invoked in top-down\norder for the entire hierarchy: A parent hotplug port detecting device\nreplacement (or removal) marks all children as removed using\npci_dev_set_disconnected() and a child hotplug port can then reliably\ndetect being removed." } ], "providerMetadata": { "dateUpdated": "2025-05-26T05:22:07.043Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/e4a1d7defbc2d806540720a5adebe24ec3488683" }, { "url": "https://git.kernel.org/stable/c/0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f" }, { "url": "https://git.kernel.org/stable/c/7535d10a2c61baeff493300070cf04d9ddda216b" }, { "url": "https://git.kernel.org/stable/c/e3260237aaadc9799107ccb940c6688195c4518d" } ], "title": "PCI: pciehp: Avoid unnecessary device replacement check", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-37843", "datePublished": "2025-05-09T06:41:52.160Z", "dateReserved": "2025-04-16T04:51:23.953Z", "dateUpdated": "2025-05-26T05:22:07.043Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-37843\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-09T07:16:05.077\",\"lastModified\":\"2025-05-12T17:32:52.810\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nPCI: pciehp: Avoid unnecessary device replacement check\\n\\nHot-removal of nested PCI hotplug ports suffers from a long-standing race\\ncondition which can lead to a deadlock: A parent hotplug port acquires\\npci_lock_rescan_remove(), then waits for pciehp to unbind from a child\\nhotplug port. Meanwhile that child hotplug port tries to acquire\\npci_lock_rescan_remove() as well in order to remove its own children.\\n\\nThe deadlock only occurs if the parent acquires pci_lock_rescan_remove()\\nfirst, not if the child happens to acquire it first.\\n\\nSeveral workarounds to avoid the issue have been proposed and discarded\\nover the years, e.g.:\\n\\nhttps://lore.kernel.org/r/4c882e25194ba8282b78fe963fec8faae7cf23eb.1529173804.git.lukas@wunner.de/\\n\\nA proper fix is being worked on, but needs more time as it is nontrivial\\nand necessarily intrusive.\\n\\nRecent commit 9d573d19547b (\\\"PCI: pciehp: Detect device replacement during\\nsystem sleep\\\") provokes more frequent occurrence of the deadlock when\\nremoving more than one Thunderbolt device during system sleep. The commit\\nsought to detect device replacement, but also triggered on device removal.\\nDifferentiating reliably between replacement and removal is impossible\\nbecause pci_get_dsn() returns 0 both if the device was removed, as well as\\nif it was replaced with one lacking a Device Serial Number.\\n\\nAvoid the more frequent occurrence of the deadlock by checking whether the\\nhotplug port itself was hot-removed. If so, there\u0027s no sense in checking\\nwhether its child device was replaced.\\n\\nThis works because the -\u003eresume_noirq() callback is invoked in top-down\\norder for the entire hierarchy: A parent hotplug port detecting device\\nreplacement (or removal) marks all children as removed using\\npci_dev_set_disconnected() and a child hotplug port can then reliably\\ndetect being removed.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: pciehp: Evitar comprobaciones innecesarias de reemplazo de dispositivo. La desconexi\u00f3n en caliente de puertos PCI hotplug anidados sufre una condici\u00f3n de ejecuci\u00f3n persistente que puede provocar un bloqueo: un puerto hotplug principal adquiere pci_lock_rescan_remove() y espera a que pciehp se desvincule de un puerto hotplug secundario. Mientras tanto, ese puerto hotplug secundario tambi\u00e9n intenta adquirir pci_lock_rescan_remove() para eliminar sus propios secundarios. El bloqueo solo ocurre si el principal adquiere pci_lock_rescan_remove() primero, no si el secundario lo adquiere primero. A lo largo de los a\u00f1os se han propuesto y descartado varias soluciones alternativas para evitar el problema, por ejemplo: https://lore.kernel.org/r/4c882e25194ba8282b78fe963fec8faae7cf23eb.1529173804.git.lukas@wunner.de/ Se est\u00e1 trabajando en una soluci\u00f3n adecuada, pero requiere m\u00e1s tiempo, ya que no es trivial y es necesariamente intrusiva. La reciente confirmaci\u00f3n 9d573d19547b (\\\"PCI: pciehp: Detectar reemplazo de dispositivo durante la suspensi\u00f3n del sistema\\\") provoca una mayor frecuencia del bloqueo al eliminar m\u00e1s de un dispositivo Thunderbolt durante la suspensi\u00f3n del sistema. Esta confirmaci\u00f3n buscaba detectar el reemplazo del dispositivo, pero tambi\u00e9n se activ\u00f3 al eliminarlo. Es imposible diferenciar con precisi\u00f3n entre reemplazo y eliminaci\u00f3n, ya que pci_get_dsn() devuelve 0 tanto si el dispositivo se elimin\u00f3 como si se reemplaz\u00f3 por uno sin n\u00famero de serie del dispositivo. Evite la ocurrencia m\u00e1s frecuente del interbloqueo comprobando si el puerto hotplug se elimin\u00f3 en caliente. De ser as\u00ed, no tiene sentido comprobar si su dispositivo secundario se reemplaz\u00f3. Esto funciona porque la llamada de retorno -\u0026gt;resume_noirq() se invoca de arriba a abajo para toda la jerarqu\u00eda: un puerto hotplug principal que detecta el reemplazo (o la eliminaci\u00f3n) de un dispositivo marca todos los secundarios como eliminados mediante pci_dev_set_disconnected() y un puerto hotplug secundario puede entonces detectar con fiabilidad su eliminaci\u00f3n.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7535d10a2c61baeff493300070cf04d9ddda216b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e3260237aaadc9799107ccb940c6688195c4518d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e4a1d7defbc2d806540720a5adebe24ec3488683\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…