ZeroHour

CVE-2026-89445

niche

Use-After-Free in Linux Kernel IOMMUFD Selftest IOPF Reporting

CVSS 3.1
8.8 high
EPSS
Published
()
Modified
AI analysis

A use-after-free (UAF) exists in the Linux kernel's IOMMUFD selftest code, where the TRIGGER_IOPF test path borrows an attach handle from group->pasid_array without synchronizing against a concurrent PASID detach, allowing iommu_report_device_fault() to dereference a handle whose backing struct iommufd_attach_handle has already been freed. It is triggered locally by racing the TRIGGER_IOPF selftest ioctl against a PASID detach on the same mock device, causing the kernel to read and write freed memory. Successful exploitation of this memory corruption could allow a local attacker with low privileges to escalate to kernel-level code execution, with high impact on confidentiality, integrity, and availability (CVSS 3.1: 8.8). Critically, the flaw lives in test-only selftest code gated behind CONFIG_IOMMUFD_TEST, so it primarily affects developer and CI machines running test kernels, not standard distribution production kernels where that option is disabled. No public proof of concept exists, the issue is not in the CISA KEV catalog, and no exploitation has been observed in the wild.

What to do: Update to a kernel containing the fix (which adds iopf_rwsem locking around attach/detach/replace and IOPF reporting in the selftest mock device). Verify that production and internet-facing systems are built without CONFIG_IOMMUFD_TEST enabled, as this debug/test option should never be set outside development environments. On test machines, restrict access to the iommufd selftest device and its ioctls to trusted users, since triggering the race requires local access to the test interface.

Affected
Linux kernel (IOMMUFD selftest, drivers/iommu/iommufd selftest/mock device code)
Estimated exposure
nichelikely only hundreds to low thousands of developer/CI test machines worldwide — The vulnerable code is confined to the CONFIG_IOMMUFD_TEST-gated selftest mock device, which major distributions do not enable in shipped production kernels, limiting exposure to kernel developers and automated testing infrastructure that…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: iommufd: Fix UAF in selftest IOPF reporting IOMMUFD selftest TRIGGER_IOPF borrows an attach handle from group->pasid_array without synchronizing against PASID detach, then a concurrent iommu_report_device_fault() can dereference that borrowed handle's domain pointer after the detach erases the handle and frees the backing struct iommufd_attach_handle. TRIGGER_IOPF then dereferences the freed handle, causing a UAF. Fix by adding a iopf_rwsem in mock_dev to follow the expected design of a real driver. Hold its read side across the whole iommu_report_device_fault() call, and its write side around every path that attaches, detaches, or replaces a device domain. This can block new reports and drains in-flight reports before an old attach handle or the IOPF fault parameter can be removed. Also take the write side while registering a mock device, since it can invoke the mock driver's default-domain attach callback.

Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.