CVE-2025-39958

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

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
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:*:*:*:*:*:*

History

21 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/3b32cf6e279597d1b6477fb89d46abf65263c139 -
  • () https://git.kernel.org/stable/c/79fa3a19aa6114189b33e2ba1f393b0f635d7544 -

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) 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.

Information

Published : 2025-10-09 10:15

Updated : 2026-11-05 22:17


NVD link : CVE-2025-39958

Mitre link : CVE-2025-39958

CVE.ORG link : CVE-2025-39958


JSON object : View

Products Affected

linux

  • linux_kernel