RE: [BUG] iommufd/selftest: KASAN slab-use-after-free in iommu_report_device_fault
"Tian, Kevin" <[email protected]> Mon, 27 Jul 2026 09:41:18 +0000
| Newsgroups | dev.linux.lists.iommu,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CO1PR11MB48353016C02FDA31BEEB274D8CCC2@CO1PR11MB4835.namprd11.prod.outlook.com> |
> From: Peiyang He <[email protected]> > Sent: Wednesday, July 22, 2026 5:52 PM > [...] > Since iommu_attach_handle_get() explicitly says that the caller should be > responsible for "synchronize the call of iommu_attach_handle_get() > with domain attachment and detachment", maybe we shouldn't add extra > lifetime > management mechanism around iommu_attach_handle, instead we should > fix this at the caller side. > > Fault report can run concurrently with PASID detach and replacement, but > before the old attach handle is removed and freed, mockdev must block new > reports > for that PASID and wait for in-flight iommu_report_device_fault() calls to > finish. > yes the mock driver should drain in-flight fault requests before the actual detachment, just like other iommu drivers do.