В ядре Linux была устранена следующая уязвимость: swiotlb: виртуальный адрес выделения Preserve для динамических пулов swiotlb_alloc_tlb() может выделяться из атомарного пула DMA, когда требуется расшифрованный пул из атомарного контекста. В CONFIG_DMA_DIRECT_REMAP атомарный пул поддерживается переназначенными виртуальными адресами, которые не совпадают с адресами прямой карты, возвращаемыми phys_to_virt(). swiotlb_init_io_tlb_pool() в настоящее время восстанавливает виртуальный адрес пула из физического начального адреса. Для распределений, поддерживаемых атомным пулом, это сохраняет неправильный адрес в pool->vaddr.
Позже swiotlb_free_tlb() передает этот адрес в dma_free_from_pool(), который не распознает часть Pass, виртуальный адрес, возвращенный путем выделения в swiotlb_init_io_tlb_pool(), и хранит этот адрес в pool->vaddr. Это сохраняет свободный путь пула, используя тот же виртуальный адрес, что и распределитель.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v3.1