CVE-2025-39958 (GCVE-0-2025-39958)

Vulnerability from cvelistv5 – Published: 2025-10-09 09:47 – Updated: 2026-10-21 12:37
VLAI
Title
iommu/s390: Make attach succeed when the device was surprise removed
Summary
In the Linux kernel, the following vulnerability has been resolved: iommu/s390: Make attach succeed when the device was surprise removed When a PCI device is removed with surprise hotplug, there may still be attempts to attach the device to the default domain as part of tear down via (__iommu_release_dma_ownership()), or because the removal happens during probe (__iommu_probe_device()). In both cases zpci_register_ioat() fails with a cc value indicating that the device handle is invalid. This is because the device is no longer part of the instance as far as the hypervisor is concerned. Currently this leads to an error return and s390_iommu_attach_device() fails. This triggers the WARN_ON() in __iommu_group_set_domain_nofail() because attaching to the default domain must never fail. With the device fenced by the hypervisor no DMAs to or from memory are possible and the IOMMU translations have no effect. Proceed as if the registration was successful and let the hotplug event handling clean up the device. This is similar to how devices in the error state are handled since commit 59bbf596791b ("iommu/s390: Make attach succeed even if the device is in error state") except that for removal the domain will not be registered later. This approach was also previously discussed at the link. Handle both cases, error state and removal, in a helper which checks if the error needs to be propagated or ignored. Avoid magic number condition codes by using the pre-existing, but never used, defines for PCI load/store condition codes and rename them to reflect that they apply to all PCI instructions.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 7018 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 59bbf596791b89c7f88fdcac29dfc39c1221d25d , < 3b32cf6e279597d1b6477fb89d46abf65263c139 (git)
Affected: 59bbf596791b89c7f88fdcac29dfc39c1221d25d , < 79fa3a19aa6114189b33e2ba1f393b0f635d7544 (git)
Affected: 59bbf596791b89c7f88fdcac29dfc39c1221d25d , < 359613f2fa009587154511e4842e8ab9532edd15 (git)
Affected: 59bbf596791b89c7f88fdcac29dfc39c1221d25d , < 9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.2
Unaffected: 0 , < 6.2 (semver)
Unaffected: 6.6.160 , ≤ 6.6.* (semver)
Unaffected: 6.12.114 , ≤ 6.12.* (semver)
Unaffected: 6.16.9 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/include/asm/pci_insn.h",
            "drivers/iommu/s390-iommu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3b32cf6e279597d1b6477fb89d46abf65263c139",
              "status": "affected",
              "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
              "versionType": "git"
            },
            {
              "lessThan": "79fa3a19aa6114189b33e2ba1f393b0f635d7544",
              "status": "affected",
              "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
              "versionType": "git"
            },
            {
              "lessThan": "359613f2fa009587154511e4842e8ab9532edd15",
              "status": "affected",
              "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
              "versionType": "git"
            },
            {
              "lessThan": "9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73",
              "status": "affected",
              "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/include/asm/pci_insn.h",
            "drivers/iommu/s390-iommu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.2"
            },
            {
              "lessThan": "6.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.160",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.160",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.114",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.9",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niommu/s390: Make attach succeed when the device was surprise removed\n\nWhen a PCI device is removed with surprise hotplug, there may still be\nattempts to attach the device to the default domain as part of tear down\nvia (__iommu_release_dma_ownership()), or because the removal happens\nduring probe (__iommu_probe_device()). In both cases zpci_register_ioat()\nfails with a cc value indicating that the device handle is invalid. This\nis because the device is no longer part of the instance as far as the\nhypervisor is concerned.\n\nCurrently this leads to an error return and s390_iommu_attach_device()\nfails. This triggers the WARN_ON() in __iommu_group_set_domain_nofail()\nbecause attaching to the default domain must never fail.\n\nWith the device fenced by the hypervisor no DMAs to or from memory are\npossible and the IOMMU translations have no effect. Proceed as if the\nregistration was successful and let the hotplug event handling clean up\nthe device.\n\nThis is similar to how devices in the error state are handled since\ncommit 59bbf596791b (\"iommu/s390: Make attach succeed even if the device\nis in error state\") except that for removal the domain will not be\nregistered later. This approach was also previously discussed at the\nlink.\n\nHandle both cases, error state and removal, in a helper which checks if\nthe error needs to be propagated or ignored. Avoid magic number\ncondition codes by using the pre-existing, but never used, defines for\nPCI load/store condition codes and rename them to reflect that they\napply to all PCI instructions."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-21T12:37:40.041Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/3b32cf6e279597d1b6477fb89d46abf65263c139"
        },
        {
          "url": "https://git.kernel.org/stable/c/79fa3a19aa6114189b33e2ba1f393b0f635d7544"
        },
        {
          "url": "https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15"
        },
        {
          "url": "https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73"
        }
      ],
      "title": "iommu/s390: Make attach succeed when the device was surprise removed",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-39958",
    "datePublished": "2025-10-09T09:47:35.601Z",
    "dateReserved": "2025-04-16T07:20:57.149Z",
    "dateUpdated": "2026-10-21T12:37:40.041Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-39958",
      "date": "2026-11-01",
      "epss": "0.00191",
      "percentile": "0.08815"
    },
    "microsoft_vex": {
      "current_release_date": "2025-10-10T01:02:11.000Z",
      "cve": "CVE-2025-39958",
      "id": "msrc_CVE-2025-39958",
      "initial_release_date": "2025-10-02T00:00:00.000Z",
      "product_status:known_not_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "iommu/s390: Make attach succeed when the device was surprise removed",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-39958.json",
      "version": "1"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "arch/s390/include/asm/pci_insn.h",
                  "drivers/iommu/s390-iommu.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "3b32cf6e279597d1b6477fb89d46abf65263c139",
                    "status": "affected",
                    "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "79fa3a19aa6114189b33e2ba1f393b0f635d7544",
                    "status": "affected",
                    "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "359613f2fa009587154511e4842e8ab9532edd15",
                    "status": "affected",
                    "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73",
                    "status": "affected",
                    "version": "59bbf596791b89c7f88fdcac29dfc39c1221d25d",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "arch/s390/include/asm/pci_insn.h",
                  "drivers/iommu/s390-iommu.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.2"
                  },
                  {
                    "lessThan": "6.2",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.6.*",
                    "status": "unaffected",
                    "version": "6.6.160",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.114",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.16.*",
                    "status": "unaffected",
                    "version": "6.16.9",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.17",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "AB8B7AE8-C232-4C69-8B7C-F9AD496F08F5",
                    "versionEndExcluding": "6.16.9",
                    "versionStartIncluding": "6.2",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
                    "matchCriteriaId": "327D22EF-390B-454C-BD31-2ED23C998A1C",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
                    "matchCriteriaId": "C730CD9A-D969-4A8E-9522-162AAF7C0EE9",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
                    "matchCriteriaId": "39982C4B-716E-4B2F-8196-FA301F47807D",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*",
                    "matchCriteriaId": "340BEEA9-D70D-4290-B502-FBB1032353B1",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*",
                    "matchCriteriaId": "47E4C5C0-079F-4838-971B-8C503D48FCC2",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*",
                    "matchCriteriaId": "5A4516A6-C12E-42A4-8C0E-68AEF3264504",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niommu/s390: Make attach succeed when the device was surprise removed\n\nWhen a PCI device is removed with surprise hotplug, there may still be\nattempts to attach the device to the default domain as part of tear down\nvia (__iommu_release_dma_ownership()), or because the removal happens\nduring probe (__iommu_probe_device()). In both cases zpci_register_ioat()\nfails with a cc value indicating that the device handle is invalid. This\nis because the device is no longer part of the instance as far as the\nhypervisor is concerned.\n\nCurrently this leads to an error return and s390_iommu_attach_device()\nfails. This triggers the WARN_ON() in __iommu_group_set_domain_nofail()\nbecause attaching to the default domain must never fail.\n\nWith the device fenced by the hypervisor no DMAs to or from memory are\npossible and the IOMMU translations have no effect. Proceed as if the\nregistration was successful and let the hotplug event handling clean up\nthe device.\n\nThis is similar to how devices in the error state are handled since\ncommit 59bbf596791b (\"iommu/s390: Make attach succeed even if the device\nis in error state\") except that for removal the domain will not be\nregistered later. This approach was also previously discussed at the\nlink.\n\nHandle both cases, error state and removal, in a helper which checks if\nthe error needs to be propagated or ignored. Avoid magic number\ncondition codes by using the pre-existing, but never used, defines for\nPCI load/store condition codes and rename them to reflect that they\napply to all PCI instructions."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\niommu/s390: Hacer que la conexi\u00f3n tenga \u00e9xito cuando el dispositivo fue eliminado inesperadamente\n\nCuando un dispositivo PCI es eliminado con hotplug por sorpresa, todav\u00eda puede haber intentos de conectar el dispositivo al dominio predeterminado como parte del desmantelamiento a trav\u00e9s de (__iommu_release_dma_ownership()), o porque la eliminaci\u00f3n ocurre durante la sonda (__iommu_probe_device()). En ambos casos, zpci_register_ioat() falla con un valor cc que indica que el identificador del dispositivo es inv\u00e1lido. Esto se debe a que el dispositivo ya no forma parte de la instancia en lo que respecta al hipervisor.\n\nActualmente esto lleva a un retorno de error y s390_iommu_attach_device() falla. Esto activa el WARN_ON() en __iommu_group_set_domain_nofail() porque la conexi\u00f3n al dominio predeterminado nunca debe fallar.\n\nCon el dispositivo cercado por el hipervisor, no son posibles DMAs hacia o desde la memoria y las traducciones IOMMU no tienen efecto. Proceder como si el registro hubiera sido exitoso y dejar que el manejo del evento hotplug limpie el dispositivo.\n\nEsto es similar a c\u00f3mo se manejan los dispositivos en estado de error desde el commit 59bbf596791b (\u0027iommu/s390: Hacer que la conexi\u00f3n tenga \u00e9xito incluso si el dispositivo est\u00e1 en estado de error\u0027) excepto que para la eliminaci\u00f3n el dominio no ser\u00e1 registrado m\u00e1s tarde. Este enfoque tambi\u00e9n fue discutido previamente en el enlace.\n\nManejar ambos casos, estado de error y eliminaci\u00f3n, en una funci\u00f3n auxiliar que verifica si el error necesita ser propagado o ignorado. Evitar c\u00f3digos de condici\u00f3n de n\u00fameros m\u00e1gicos utilizando las definiciones preexistentes, pero nunca usadas, para los c\u00f3digos de condici\u00f3n de carga/almacenamiento PCI y renombrarlas para reflejar que se aplican a todas las instrucciones PCI."
          }
        ],
        "id": "CVE-2025-39958",
        "lastModified": "2026-10-21T13:18:17.850",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ]
        },
        "published": "2025-10-09T10:15:37.867",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/3b32cf6e279597d1b6477fb89d46abf65263c139"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/79fa3a19aa6114189b33e2ba1f393b0f635d7544"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Modified",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "NVD-CWE-noinfo"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-06-30T10:25:28+00:00",
      "cve": "CVE-2025-39958",
      "id": "CVE-2025-39958",
      "initial_release_date": "2025-10-09T00:00:00+00:00",
      "product_status:known_affected": "232",
      "product_status:known_not_affected": "42",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: iommu/s390: Make attach succeed when the device was surprise removed",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-39958.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.