В ядре Linux устранена следующая уязвимость:
mm/vma: не пытайтесь отменить сопоставление VMA, если mmap_prepare() вызывается из mmap(). Функциональность перехватчика mmap_prepare включает в себя возможность вызывать
mmap_prepare() из перехватчика mmap() существующих «сложенных» драйверов, то есть
те, которые способны вызывать перехватчики mmap других драйверов/файлов
системы (например, overlayfs, shm). В рамках функциональности действия mmap_prepare мы обрабатываем ошибки путем
отмена отображения VMA, если он возникнет.
Это работает в обычном mmap_prepare
случае, поскольку мы вызываем это действие в последний момент, когда VMA
установился на кленовом дереве. Однако перехватчик mmap() передает не полностью установленный указатель VMA на
вызывающий абонент (это мотивация работы mmap_prepare()), который
отдельностоящий. Поэтому попытка отменить отображение VMA в этом состоянии будет проблематичной, поскольку
наиболее очевидным симптомом является предупреждение в vma_mark_detached(), потому что
VMA уже отключен.
Это также необязательно — обработчик mmap() очистит VMA в случае ошибки. Чтобы решить эту проблему, этот патч распространяется независимо от того, выполняется ли действие mmap.
завершается через уровень совместимости или напрямую. Если первое, то мы не пытаемся очистить VMA, если второе, то мы
делать.
Этот патч также обновляет тесты VMA пользовательского пространства, чтобы отразить изменения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() The mmap_prepare hook functionality includes the ability to invoke mmap_prepare() from the mmap() hook of existing 'stacked' drivers, that is ones which are capable of calling the mmap hooks of other drivers/file systems (e.g. overlayfs, shm). As part of the mmap_prepare action functionality, we deal with errors by unmapping the VMA should one arise. This works in the usual mmap_prepare case, as we invoke this action at the last moment, when the VMA is established in the maple tree. However, the mmap() hook passes a not-fully-established VMA pointer to the caller (which is the motivation behind the mmap_prepare() work), which is detached. So attempting to unmap a VMA in this state will be problematic, with the most obvious symptom being a warning in vma_mark_detached(), because the VMA is already detached. It's also unncessary - the mmap() handler will clean up the VMA on error. So to fix this issue, this patch propagates whether or not an mmap action is being completed via the compatibility layer or directly. If the former, then we do not attempt VMA cleanup, if the latter, then we do. This patch also updates the userland VMA tests to reflect the change.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |