iommu/amd: Fix clone_alias() to use the original device's devid
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3332364e4ebc0581d133a334645a20fd13b580f1 · < faad224fe0f0857a04ff2eb3c90f0de57f47d0f3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/amd: Fix clone_alias() to use the original device's devid
Currently clone_alias() assumes first argument (pdev) is always the original device pointer. This function is called by pci_for_each_dma_alias() which based on topology decides to send original or alias device details in first argument.
This meant that the source devid used to look up and copy the DTE may be incorrect, leading to wrong or stale DTE entries being propagated to alias device.
Fix this by passing the original pdev as the opaque data argument to both the direct clone_alias() call and pci_for_each_dma_alias(). Inside clone_alias(), retrieve the original device from data and compute devid from it.
From the CVE record · Linux
The Linux kernel’s AMD IOMMU clone_alias() can use the wrong device ID when copying a device table entry (DTE), propagating an incorrect or stale entry to an alias device. The input does not specify an attacker action or whether exploitation requires network access, local access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.