iommu: Handle unmap error when iommu_debug is enabled
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu: Handle unmap error when iommu_debug is enabled
Sashiko noticed a latent bug where the map error flow called iommu_unmap() which calls iommu_debug_unmap_begin()/iommu_debug_unmap_end() however since this is an error path the map flow never actually established the original iommu_debug_map() it will malfunction.
Lift the unmap error handling into iommu_map_nosync() and reorder it so the trace_map()/iommu_debug_map() records the partial mapping and then immediately unmaps it. This avoid creating the unbalanced tracking and provides saner tracing instead of a unmap unmatched to any map.
From the CVE record · Linux
The Linux kernel’s IOMMU mapping error path can malfunction when iommu_debug is enabled because it unmaps a partial mapping before recording it for debug tracking. The input does not establish an attacker action, access requirements, or user interaction needed to trigger the error path.
Engineers running the Linux kernel with iommu_debug enabled should check their kernel version against the vendor advisory; affected versions are not specified.