Ad

CVE-2026-99580

HIGH CVSS 3.1: 7,8 EPSS 0.16%
Обновлено 22 ноября 2026
Linux
Параметр Значение
CVSS 7,8 (HIGH)
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: mm/userfaultfd: только выделение anon_vma в CoW mappings find_vma_and_prepare_anon() может в конечном итоге привести к выделению anon_vma в VMAs, которые не являются CoW mappings, что неверно. Если у нас есть файл MAP_SHARED R / O, нам не хватает VM_SHARED (но есть VM_MAYSHARE) и не хватает VM_MAYWRITE. В то время как uffd позже отклоняет такие отображения (регистрация uffd требует VM_MAYWRITE, см. комментарий в validate_dst_vma) find_vma_and_prepare_anon(), все еще ошибочно выделяет анон vma, прежде чем он подтвердит vma.

Это, в свою очередь, позже путает copy_page_range()->vma_needs_copy() так, что мы в конечном итоге вызываем copy_hugetlb_page_range() с диапазонами, которые на самом деле не содержат *любую* информацию на странице, которая требует копирования, что в первую очередь является основой для совместного использования таблиц PMD. copy_hugetlb_page_range() не должен беспокоиться об общих таблицах PMD вообще: нет никакого смысла копировать таблицы страниц, которые можно полностью воссоздать. В конечном итоге в функции с разделяемыми таблицами страниц является реальной проблемой. If a destination PMD table is shared in copy_hugetlb_page_range(), it might get concurrently unshared as we are not holding relevant locks, resulting in us using a page table that is no longer mapped and possibly freed after calling: dst_pte = huge_pte_alloc(dst, dst_vma, addr, sz); To fix it, do not allocate an anon_vma in non-CoW mappings and add a safety guard to copy_hugetlb_page_range(), making sure that we never end up messing with shared PMD tables in there.

Перед фиксацией 867a43a34ff8a («userfaultfd: использование блокировок per-vma в операциях userfaultfd») мы всегда проверяем VMA перед выделением anon_vma, и, следовательно, никогда не неправильно выделяем anon_vma. Поскольку uffd_lock_vma() является частью одного и того же поискового механизма, а также содержит вводящую в заблуждение проверку VM_SHARED, измените ее непосредственно для согласованности. Последующая очистка полностью прекратит блокировку hugetlb_vma_lock_read(src_vma в copy_hugetlb_page_range().

Кроме того, использование VM_SHARED в коде userfaultfd должно быть очищено позже, чтобы сосредоточиться на отображениях CoW против не-CoW.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: mm/userfaultfd: only allocate anon_vma in CoW mappings find_vma_and_prepare_anon() can end up allocating an anon_vma in VMAs that are not CoW mappings, which is wrong. If we have a MAP_SHARED R/O file mapped, we lack VM_SHARED (but do have VM_MAYSHARE) and lack VM_MAYWRITE. While uffd later rejects such mappings (uffd registration requires VM_MAYWRITE, see comment in validate_dst_vma) find_vma_and_prepare_anon() still wrongly allocates an anon vma before it validates the vma. This in turn later confuses copy_page_range()->vma_needs_copy() such that we end up calling copy_hugetlb_page_range() with ranges that actually do not contain *any* per-pagetable information that would require copying, which is the basis for PMD-table sharing in the first place. copy_hugetlb_page_range() should not have to worry about shared PMD tables at all: it doesn't make any sense to copy page tables that are shared, as they can be fully recreated later. Ending up in the function with shareable page tables is the real issue. If a destination PMD table is shared in copy_hugetlb_page_range(), it might get concurrently unshared as we are not holding relevant locks, resulting in us using a page table that is no longer mapped and possibly freed after calling: dst_pte = huge_pte_alloc(dst, dst_vma, addr, sz); To fix it, do not allocate an anon_vma in non-CoW mappings and add a safety guard to copy_hugetlb_page_range(), making sure that we never end up messing with shared PMD tables in there. Before commit 867a43a34ff8a ("userfaultfd: use per-vma locks in userfaultfd operations") we would always validate the VMA before allocating an anon_vma, and consequently never wrongly allocate an anon_vma. As uffd_lock_vma() is part of the same lookup machinery and also contains a misleading VM_SHARED check, change that one as well directly for consistency. A follow-up cleanup will stop taking the hugetlb_vma_lock_read(src_vma) lock in copy_hugetlb_page_range() entirely. Further, the usage of VM_SHARED in userfaultfd code should be cleaned up later to focus on CoW vs. non-CoW mappings.

Характеристики атаки

Способ атаки
Локальный
Нужен локальный доступ
Сложность
Низкая
Легко эксплуатировать
Нужны права
Низкие
Нужны базовые права
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Высокое
Полная утечка данных
Целостность
Высокое
Полная модификация данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1