CVE-2025-39958
iommu/s390: Make attach succeed when the device was surprise removed
Description
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.
INFO
Published Date :
Oct. 9, 2025, 10:15 a.m.
Last Modified :
Nov. 5, 2026, 10:17 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Apply kernel updates to affected systems.
- Ensure kernel version incorporates the fix.
- Monitor system stability after update.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-39958.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-39958 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-39958
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-39958 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-39958 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 05, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-39958', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-05T21:13:24.454203Z'} -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 21, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2025/39xxx/CVE-2025-39958.json">CVE-2025-39958</a> Added Reference https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15 Added Reference https://git.kernel.org/stable/c/3b32cf6e279597d1b6477fb89d46abf65263c139 Added Reference https://git.kernel.org/stable/c/79fa3a19aa6114189b33e2ba1f393b0f635d7544 Added Reference https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73 Removed Reference https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15 Removed Reference https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73 Removed Reference Type https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73 Types: Patch -
CVE Translated by [email protected]
Oct. 19, 2026
Action Type Old Value New Value Added Translation Title: Linux, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: iommu/s390: Hacer que la conexión tenga éxito cuando el dispositivo fue eliminado inesperadamente Cuando un dispositivo PCI es eliminado con hotplug por sorpresa, todavía puede haber intentos de conectar el dispositivo al dominio predeterminado como parte del desmantelamiento a través de (__iommu_release_dma_ownership()), o porque la eliminación 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álido. Esto se debe a que el dispositivo ya no forma parte de la instancia en lo que respecta al hipervisor. Actualmente 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ón al dominio predeterminado nunca debe fallar. Con 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. Esto es similar a cómo se manejan los dispositivos en estado de error desde el commit 59bbf596791b ('iommu/s390: Hacer que la conexión tenga éxito incluso si el dispositivo está en estado de error') excepto que para la eliminación el dominio no será registrado más tarde. Este enfoque también fue discutido previamente en el enlace. Manejar ambos casos, estado de error y eliminación, en una función auxiliar que verifica si el error necesita ser propagado o ignorado. Evitar códigos de condición de números mágicos utilizando las definiciones preexistentes, pero nunca usadas, para los códigos de condición de carga/almacenamiento PCI y renombrarlas para reflejar que se aplican a todas las instrucciones PCI. -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '59bbf596791b89c7f88fdcac29dfc39c1221d25d', 'lessThan': '359613f2fa009587154511e4842e8ab9532edd15', 'versionType': 'git'}, {'status': 'affected', 'version': '59bbf596791b89c7f88fdcac29dfc39c1221d25d', 'lessThan': '9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73', 'versionType': 'git'}], 'programFiles': ['arch/s390/include/asm/pci_insn.h', 'drivers/iommu/s390-iommu.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.2'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.2', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.16.9', 'versionType': 'semver', 'lessThanOrEqual': '6.16.*'}, {'status': 'unaffected', 'version': '6.17', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['arch/s390/include/asm/pci_insn.h', 'drivers/iommu/s390-iommu.c'], 'defaultStatus': 'affected'}] -
Reanalysis by [email protected]
Feb. 26, 2026
Action Type Old Value New Value -
Initial Analysis by [email protected]
Feb. 03, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Added CWE NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.16.9 Added Reference Type kernel.org: https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73 Types: Patch -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 09, 2025
Action Type Old Value New Value Added Description 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. Added Reference https://git.kernel.org/stable/c/359613f2fa009587154511e4842e8ab9532edd15 Added Reference https://git.kernel.org/stable/c/9ffaf5229055fcfbb3b3d6f1c7e58d63715c3f73