iommu/dma-iommu: Fix wrong scatterlist length assignment in P2PDMA path
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 |
|
|
6.18.577.1.57.2In the Linux kernel, the following vulnerability has been resolved:
iommu/dma-iommu: Fix wrong scatterlist length assignment in P2PDMA path
In iommu_dma_map_sg(), when handling PCI P2PDMA cases, the DMA length of the current scatterlist segment `s` is incorrectly assigned from the head entry `sg->length` instead of the current entry `s->length`.
This typo causes all P2PDMA segments in the scatterlist to inherit the length of the first segment, leading to corrupted DMA lengths for multi- segment scatterlists.
Fix this by using `s->length` instead of `sg->length`.
From the CVE record · Linux
The Linux kernel’s iommu_dma_map_sg() assigns the first scatterlist entry’s length to every PCI P2PDMA segment, corrupting DMA lengths in multi-segment scatterlists. The input does not describe an attacker path or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels that use PCI P2PDMA with multi-segment scatterlists should check whether their kernel includes the fix; affected versions are not specified.