iommufd: Do not add the same hwpt to the ioas->hwpt_list twice
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:
iommufd: Do not add the same hwpt to the ioas->hwpt_list twice
The hwpt is added to the hwpt_list only during its creation, it is never added again. This hunk is some missed leftover from rework. Adding it twice will corrupt the linked list in some cases.
It effects HWPT specific attachment, which is something the test suite cannot cover until we can create a legitimate struct device with a non-system iommu "driver" (ie we need the bus removed from the iommu code)
From the CVE record · Linux
The Linux kernel's iommufd code can add the same hardware page table to an IOAS list twice, corrupting the linked list in some cases. This affects HWPT-specific attachment; the input does not specify an attacker capability, access requirements, or user interaction.
Engineers running Linux kernels that support iommufd HWPT-specific attachment should check their versions against the vendor advisory; affected versions were not provided.