{"id":71281,"date":"2025-10-09T13:45:37","date_gmt":"2025-10-09T10:15:37","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-39958-iommu-s390-make-attach-succeed-when-the-device-was-surprise-removed\/"},"modified":"2025-10-09T13:45:37","modified_gmt":"2025-10-09T10:15:37","slug":"cve-2025-39958-iommu-s390-make-attach-succeed-when-the-device-was-surprise-removed","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-39958-iommu-s390-make-attach-succeed-when-the-device-was-surprise-removed\/","title":{"rendered":"CVE-2025-39958 &#8211; iommu\/s390: Make attach succeed when the device was surprise removed"},"content":{"rendered":"<p>CVE ID : CVE-2025-39958<\/p>\n<p>Published :  Oct. 9, 2025, 10:15 a.m. | 22\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>iommu\/s390: Make attach succeed when the device was surprise removed<\/p>\n<p>When a PCI device is removed with surprise hotplug, there may still be<br \/>\nattempts to attach the device to the default domain as part of tear down<br \/>\nvia (__iommu_release_dma_ownership()), or because the removal happens<br \/>\nduring probe (__iommu_probe_device()). In both cases zpci_register_ioat()<br \/>\nfails with a cc value indicating that the device handle is invalid. This<br \/>\nis because the device is no longer part of the instance as far as the<br \/>\nhypervisor is concerned.<\/p>\n<p>Currently this leads to an error return and s390_iommu_attach_device()<br \/>\nfails. This triggers the WARN_ON() in __iommu_group_set_domain_nofail()<br \/>\nbecause attaching to the default domain must never fail.<\/p>\n<p>With the device fenced by the hypervisor no DMAs to or from memory are<br \/>\npossible and the IOMMU translations have no effect. Proceed as if the<br \/>\nregistration was successful and let the hotplug event handling clean up<br \/>\nthe device.<\/p>\n<p>This is similar to how devices in the error state are handled since<br \/>\ncommit 59bbf596791b (&#8220;iommu\/s390: Make attach succeed even if the device<br \/>\nis in error state&#8221;) except that for removal the domain will not be<br \/>\nregistered later. This approach was also previously discussed at the<br \/>\nlink.<\/p>\n<p>Handle both cases, error state and removal, in a helper which checks if<br \/>\nthe error needs to be propagated or ignored. Avoid magic number<br \/>\ncondition codes by using the pre-existing, but never used, defines for<br \/>\nPCI load\/store condition codes and rename them to reflect that they<br \/>\napply to all PCI instructions.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-39958 Published : Oct. 9, 2025, 10:15 a.m. | 22\u00a0minutes ago 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-71281","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=71281"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71281\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=71281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=71281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=71281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}