В ядре Linux устранена следующая уязвимость:
dmaengine: dma-axi-dmac: использовать пул DMA для управления дескриптором DMA
Для таких архитектур, как Microblaze или Arm64 (где используется этот IP),
Установлен DMA_DIRECT_REMAP, что означает, что dma_alloc_coherent() может
переназначить (и, следовательно, vmalloc()) некоторую память. Это стало заметно в дизайне
где dma_direct_use_pool() невозможно. Учитывая вышеизложенное, при вызове dma_free_coherent() функция vunmap() будет
вызывается из контекста softirq и, таким образом, приводит к ошибке BUG().
Чтобы это исправить, используйте пул DMA, выделенный в
.device_alloc_chan_resources() и выделить из него блоки. Ключ
Дело в том, что теперь dma_pool_free() используется в axi_dmac_free_desc() для
освободите блоки, и это просто освободит блоки из пула в
ощущение, что их можно использовать снова. Другими словами, никакого фактического вызова
dma_free_coherent() происходит.
Это происходит только при разрушении бассейна.
в axi_dmac_free_chan_resources(), чего не происходит ни при каком прерывании
контекст.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: dmaengine: dma-axi-dmac: use DMA pool to manange DMA descriptor For architectures like Microblaze or arm64 (where this IP is used), DMA_DIRECT_REMAP is set which means that dma_alloc_coherent() might remap (and hence vmalloc()) some memory. This became visible in a design where dma_direct_use_pool() is not possible. With the above, when calling dma_free_coherent(), vunmap() would be called from softirq context and thus leading to a BUG(). To fix it, use a dma pool that is allocated in .device_alloc_chan_resources() and allocate blocks from it. The key point is that now dma_pool_free() is used in axi_dmac_free_desc() to free the blocks and that just frees the blocks from the pool in the sense they can be used again. In other words, no actual call to dma_free_coherent() happens. That only happens when destroying the pool in axi_dmac_free_chan_resources() which does not happen in any interrupt context.
Уязвимые продукты 4
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8
|
6.12.97
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8
|
6.18.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8
|
7.1.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8
|
7.2-rc1
|