CVE-2026-53164: iommu/dma: Do not try to iommu_map a 0 length region in swiotlb
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iommu/dma: Do not try to iommu_map a 0 length region in swiotlb
iommu_dma_iova_link_swiotlb() processes a mapping that is unaligned in three parts, the head, middle and trailer. If the middle is empty because there are no aligned pages it will call down to iommu_map() with a 0 size which the iommupt implementation will fail as illegal.
It then tries to do an error unwind and starts from the wrong spot corrupting the mapping so the eventual destruction triggers a WARN_ON.
Check for 0 length and avoid mapping and use offset not 0 as the starting point to unlink.
This is frequently triggered by using some kinds of thunderbolt NVMe drives that trigger forced SWIOTLB for unaligned memory. NVMe seems to pass in oddly aligned buffers for the passthrough commands from smartctl that hit this condition.
The Linux kernel CVE team has assigned CVE-2026-53164 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.16 with commit 433a76207dcf5facc0183acb790f6e8398585258 and fixed in 6.18.36 with commit ab61c990a87d084f5565ee70340543e3a5394697 Issue introduced in 6.16 with commit 433a76207dcf5facc0183acb790f6e8398585258 and fixed in 7.0.13 with commit b16f8d40bac9ced838d24c9842707af9ecae92e2 Issue introduced in 6.16 with commit 433a76207dcf5facc0183acb790f6e8398585258 and fixed in 7.1 with commit 6ec91df8aff77e2e8fe3179c1f3fc15b43a40ba3
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-53164
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/iommu/dma-iommu.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/ab61c990a87d084f5565ee70340543e3a5394697 https://git.kernel.org/stable/c/b16f8d40bac9ced838d24c9842707af9ecae92e2 https://git.kernel.org/stable/c/6ec91df8aff77e2e8fe3179c1f3fc15b43a40ba3