CVE-2025-21770: iommu: Fix potential memory leak in iopf_queue_remove_device()
In the Linux kernel, the following vulnerability has been resolved:
iommu: Fix potential memory leak in iopfqueueremovedevice()
The iopfqueueremovedevice() helper removes a device from the per-iommu iopf queue when PRI is disabled on the device. It responds to all outstanding iopf's with an IOMMUPAGERESPINVALID code and detaches the device from the queue.
However, it fails to release the group structure that represents a group of iopf's awaiting for a response after responding to the hardware. This can cause a memory leak if iopfqueueremovedevice() is called with pending iopf's.
Fix it by calling iopffreegroup() after the iopf group is responded.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Call iopf_free_group() after the iopf group is responded to, and ensure iopf_queue_remove_device() responds to outstanding IOPFs with an IOMMU_PAGE_RESP_INVALID code before detaching the pending IOPFs.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21770?
CVE-2025-21770 has been classified as a low-severity vulnerability affecting the Linux kernel.
What impact does CVE-2025-21770 have on affected systems?
CVE-2025-21770 could potentially lead to a memory leak when devices are removed from the iopf queue.
How do I fix CVE-2025-21770?
To fix CVE-2025-21770, users should update their Linux kernel to the latest patched version.
Which versions of the Linux kernel are affected by CVE-2025-21770?
CVE-2025-21770 affects specific versions of the Linux kernel that include the vulnerable iommu component.
Is CVE-2025-21770 exploitable remotely?
CVE-2025-21770 is not considered to be remotely exploitable, as it requires local access to the affected systems.