Linux
swiotlb: Preserve allocation virtual address for dynamic pools
In the Linux kernel, the following vulnerability has been resolved: swiotlb: Preserve allocation virtual address for dynamic pools swiotlb_alloc_tlb() can allocate from the DMA atomic pool when a decrypted pool is needed from atomic context. With CONFIG_DMA_DIRECT_REMAP, the atomic pool is backed by remapped virtual addresses, which are not the same as the direct-map addresses returned by phys_to_virt(). swiotlb_init_io_tlb_pool() currently reconstructs the pool virtual address from the physical start address. For atomic-pool backed allocations this stores the wrong address in pool->vaddr. Later, swiotlb_free_tlb() passes that address to dma_free_from_pool(), which will fail to recognize the chunk Pass the virtual address returned by the allocation path into swiotlb_init_io_tlb_pool(), and store that address in pool->vaddr. This keeps the pool free path using the same virtual address as the allocator.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 79636caad3618e2b38457f6e298c9b31ba82b489, < 68bf3ebd8e7020dae58e8aa14c7d482738bff9a8
- >= 79636caad3618e2b38457f6e298c9b31ba82b489, < 45507dcb0847e96add4455274b12df0eca6590b4
- >= 79636caad3618e2b38457f6e298c9b31ba82b489, < 35e0103177826430b5df888b1506239d41e76ab5
- >= 79636caad3618e2b38457f6e298c9b31ba82b489, < c1f4d7763cdf1b9e0d35c14aa6f52d0512a36319
- >= 79636caad3618e2b38457f6e298c9b31ba82b489, < 57d29044d0f29a76c6ec0c112c8c7371d5608dc7
Fixed in 68bf3ebd8e7020dae58e8aa14c7d482738bff9a8, 45507dcb0847e96add4455274b12df0eca6590b4, 35e0103177826430b5df888b1506239d41e76ab5, c1f4d7763cdf1b9e0d35c14aa6f52d0512a36319, 57d29044d0f29a76c6ec0c112c8c7371d5608dc7
- 6.6
Fixed in 0, 6.6.157, 6.12.110, 6.18.52, 7.2.6, 7.3
Mitigation
Upgrade Linux to 68bf3ebd8e7020dae58e8aa14c7d482738bff9a8 or 45507dcb0847e96add4455274b12df0eca6590b4 or 35e0103177826430b5df888b1506239d41e76ab5 or c1f4d7763cdf1b9e0d35c14aa6f52d0512a36319 or 57d29044d0f29a76c6ec0c112c8c7371d5608dc7 or later.
Upgrade Linux to 0 or 6.6.157 or 6.12.110 or 6.18.52 or 7.2.6 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.