{"id":"CVE-2026-89445","state":"PUBLISHED","title":"iommufd: Fix UAF in selftest IOPF reporting","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niommufd: Fix UAF in selftest IOPF reporting\n\nIOMMUFD selftest TRIGGER_IOPF borrows an attach handle from\ngroup->pasid_array without synchronizing against PASID detach,\nthen a concurrent iommu_report_device_fault() can dereference\nthat borrowed handle's domain pointer after the detach erases\nthe handle and frees the backing struct iommufd_attach_handle.\nTRIGGER_IOPF then dereferences the freed handle, causing a UAF.\n\nFix by adding a iopf_rwsem in mock_dev to follow the expected design\nof a real driver. Hold its read side across the whole\niommu_report_device_fault() call, and its write side around every\npath that attaches, detaches, or replaces a device domain.\nThis can block new reports and drains in-flight reports before an old\nattach handle or the IOPF fault parameter can be removed.\nAlso take the write side while registering a mock device, since\nit can invoke the mock driver's default-domain attach callback.","publishedAt":"2026-09-11T19:43:12.765Z","updatedAt":"2026-10-19T08:46:54.686Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"fd2e7ac94d6d813548b021473c3dddc30c8c07d1","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"cab2895729516799384d48560e6fca105fb3f927","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"e27e90bde68b2ab92e63ed19caad1ef57188bea0","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"8c07df7cdfcf52f1ff276c588612aabc6c6b8399","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/selftest.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.112","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.50","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/selftest.c"]}],"references":["https://git.kernel.org/stable/c/fd2e7ac94d6d813548b021473c3dddc30c8c07d1","https://git.kernel.org/stable/c/cab2895729516799384d48560e6fca105fb3f927","https://git.kernel.org/stable/c/e27e90bde68b2ab92e63ed19caad1ef57188bea0","https://git.kernel.org/stable/c/8c07df7cdfcf52f1ff276c588612aabc6c6b8399"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89445.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89445","state":"PUBLISHED","datePublished":"2026-09-11T19:43:12.765Z","dateUpdated":"2026-10-19T08:46:54.686Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.704Z"},"containers":{"cna":{"title":"iommufd: Fix UAF in selftest IOPF reporting","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niommufd: Fix UAF in selftest IOPF reporting\n\nIOMMUFD selftest TRIGGER_IOPF borrows an attach handle from\ngroup->pasid_array without synchronizing against PASID detach,\nthen a concurrent iommu_report_device_fault() can dereference\nthat borrowed handle's domain pointer after the detach erases\nthe handle and frees the backing struct iommufd_attach_handle.\nTRIGGER_IOPF then dereferences the freed handle, causing a UAF.\n\nFix by adding a iopf_rwsem in mock_dev to follow the expected design\nof a real driver. Hold its read side across the whole\niommu_report_device_fault() call, and its write side around every\npath that attaches, detaches, or replaces a device domain.\nThis can block new reports and drains in-flight reports before an old\nattach handle or the IOPF fault parameter can be removed.\nAlso take the write side while registering a mock device, since\nit can invoke the mock driver's default-domain attach callback."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"fd2e7ac94d6d813548b021473c3dddc30c8c07d1","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"cab2895729516799384d48560e6fca105fb3f927","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"e27e90bde68b2ab92e63ed19caad1ef57188bea0","versionType":"git"},{"version":"ddee19971081b42615d62f4fdada21274708ed4d","status":"affected","lessThan":"8c07df7cdfcf52f1ff276c588612aabc6c6b8399","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/selftest.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.112","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.50","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/selftest.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/fd2e7ac94d6d813548b021473c3dddc30c8c07d1"},{"url":"https://git.kernel.org/stable/c/cab2895729516799384d48560e6fca105fb3f927"},{"url":"https://git.kernel.org/stable/c/e27e90bde68b2ab92e63ed19caad1ef57188bea0"},{"url":"https://git.kernel.org/stable/c/8c07df7cdfcf52f1ff276c588612aabc6c6b8399"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The UAF is reached only via local ioctls on /dev/iommu (or VFIO-compat /dev/vfio/vfio): IOMMU_TEST_CMD TRIGGER_IOPF calls iommu_report_device_fault() while a concurrent PASID/RID detach frees the attach handle. No network or packet-receive path exists.\nAC:L - The attacker controls both sides of the race by issuing concurrent IOMMU_TEST_OP_TRIGGER_IOPF and PASID_DETACH/REPLACE or mock-domain destroy on the same fd; iommu_attach_handle_get() does not keep the handle alive after lookup, so no victim timing or uncontrollable layout is required.\nPR:L - iommufd_fops_open() and IOMMU_TEST_CMD perform no capability checks; /dev/iommu is 0660 and MOCK_DOMAIN creates an IOPF-capable mock device without physical assignment, so an unprivileged local user with iommufd access (selftest/syzkaller kernels or VFIO/iommufd group membership) can trigger it without init-namespace root.\nUI:N - Exploitation requires no victim action; the attacker programmatically opens iommufd, creates a mock domain, attaches a PASID, and races TRIGGER_IOPF against detach through their own file descriptors and ioctls.\nS:C - The freed object is struct iommufd_attach_handle used by iommu_report_device_fault() to dispatch domain->iopf_handler and complete IOMMU page faults; pre-fix TRIGGER_IOPF also accepted any bound idev, so corrupting those handles can hijack IOMMU fault/DMA isolation across the device-assignment boundary.\nC:H - Use-after-free of iommufd_attach_handle lets an attacker reclaim the slab and control the domain pointer later read as attach_handle->domain->iopf_handler, enabling arbitrary kernel reads through the IOPF handler and fault-queue path.\nI:H - The UAF is a function-pointer dereference of domain->iopf_handler plus later handle use in iommufd_fault_iopf_handler; heap spraying yields an arbitrary write and control-flow hijack in the IOMMU fault-completion path.\nA:H - Dereferencing the freed attach handle in find_fault_handler()/iommu_report_device_fault() causes a kernel oops or panic; the UAF is reliably crashable even when not fully exploited for code execution."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T08:46:54.686Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.112"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.18.50"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.2.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}