« Volver al listado

CVE-2025-37843

Estado: AnalizadaMedia (5.5)—

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.:

Leer descripción completaMostrar menos

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.

CVSS

Probabilidad de explotación (EPSS)

EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).

Tecnologías afectadas (1)

CWE

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2025-37843",
  "cveTags": [],
  "metrics": {
    "cvssMetricV31": [
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "scope": "UNCHANGED",
          "version": "3.1",
          "baseScore": 5.5,
          "attackVector": "LOCAL",
          "baseSeverity": "MEDIUM",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "integrityImpact": "NONE",
          "userInteraction": "NONE",
          "attackComplexity": "LOW",
          "availabilityImpact": "HIGH",
          "privilegesRequired": "LOW",
          "confidentialityImpact": "NONE"
        },
        "impactScore": 3.6,
        "exploitabilityScore": 1.8
      }
    ]
  },
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664",
              "lessThan": "e4a1d7defbc2d806540720a5adebe24ec3488683",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664",
              "lessThan": "0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664",
              "lessThan": "7535d10a2c61baeff493300070cf04d9ddda216b",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9d573d19547b3fae0c1d4e5fce52bdad3fda3664",
              "lessThan": "e3260237aaadc9799107ccb940c6688195c4518d",
              "versionType": "git"
            }
          ],
          "programFiles": [
            "drivers/pci/hotplug/pciehp_core.c"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "6.11",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "6.12.24",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "status": "unaffected",
              "version": "6.13.12",
              "versionType": "semver",
              "lessThanOrEqual": "6.13.*"
            },
            {
              "status": "unaffected",
              "version": "6.14.3",
              "versionType": "semver",
              "lessThanOrEqual": "6.14.*"
            },
            {
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "drivers/pci/hotplug/pciehp_core.c"
          ],
          "defaultStatus": "affected"
        }
      ]
    }
  ],
  "published": "2025-05-09T07:16:05.077",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/0d0bbd01f7c0ac7d1be9f85aaf2cd0baec34655f",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/7535d10a2c61baeff493300070cf04d9ddda216b",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/e3260237aaadc9799107ccb940c6688195c4518d",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/e4a1d7defbc2d806540720a5adebe24ec3488683",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "type": "Primary",
      "source": "nvd@nist.gov",
      "description": [
        {
          "lang": "en",
          "value": "CWE-667"
        }
      ]
    }
  ],
  "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's no sense in checking\nwhether its child device was replaced.\n\nThis works because the ->resume_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ón en caliente de puertos PCI hotplug anidados sufre una condición de ejecución 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én 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ños 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á trabajando en una solución adecuada, pero requiere más tiempo, ya que no es trivial y es necesariamente intrusiva. La reciente confirmación 9d573d19547b (\"PCI: pciehp: Detectar reemplazo de dispositivo durante la suspensión del sistema\") provoca una mayor frecuencia del bloqueo al eliminar más de un dispositivo Thunderbolt durante la suspensión del sistema. Esta confirmación buscaba detectar el reemplazo del dispositivo, pero también se activó al eliminarlo. Es imposible diferenciar con precisión entre reemplazo y eliminación, ya que pci_get_dsn() devuelve 0 tanto si el dispositivo se eliminó como si se reemplazó por uno sin número de serie del dispositivo. Evite la ocurrencia más frecuente del interbloqueo comprobando si el puerto hotplug se eliminó en caliente. De ser así, no tiene sentido comprobar si su dispositivo secundario se reemplazó. Esto funciona porque la llamada de retorno ->resume_noirq() se invoca de arriba a abajo para toda la jerarquía: un puerto hotplug principal que detecta el reemplazo (o la eliminación) 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ón."
    }
  ],
  "lastModified": "2026-06-17T09:15:33.063",
  "configurations": [
    {
      "nodes": [
        {
          "negate": false,
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "4984066B-B1BF-482D-B569-B93EC91B55F2",
              "versionEndExcluding": "6.12.24",
              "versionStartIncluding": "6.11"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "4A475784-BF3B-4514-81EE-49C8522FB24A",
              "versionEndExcluding": "6.13.12",
              "versionStartIncluding": "6.13"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "483E2E15-2135-4EC6-AB64-16282C5EF704",
              "versionEndExcluding": "6.14.3",
              "versionStartIncluding": "6.14"
            }
          ],
          "operator": "OR"
        }
      ]
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}