diff options
| author | Krzysztof Karas <krzysztof.karas@intel.com> | 2026-10-02 05:33:20 +0000 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-10-09 10:46:10 +0200 |
| commit | 1c8f6308e557f32412e9d4678b3f029f47f6d9aa (patch) | |
| tree | 85659414e5fbb38a5267901826704bef8b868d92 /scripts/basic/split-include.c | |
| parent | 1ae140d0f27248fc588f2f3baa9940512ee078f1 (diff) | |
| download | linux-1c8f6308e557f32412e9d4678b3f029f47f6d9aa.tar.gz linux-1c8f6308e557f32412e9d4678b3f029f47f6d9aa.zip | |
iommu/dma: Catch scatterlist length overflows
It is possible, when a very large mapping uses only one
scatterlist, that padding overflows scatterlist's length field.
This results in:
1) silently wrapping the value
2) smaller than desired mappings produced by iommu_map_sg
3) leaving mapped bytes in memory (no iommu_unmap)
Address this issue by adding overflow detection for scatterlist
length field.
Fixes: 809eac54cdd6 ("iommu/dma: Implement scatterlist segment merging")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
