Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

CVE-2026-97533

Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
25/09/2026
Última modificación:
19/10/2026

Descripción

*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> x86/mm/pat: Acquire init_mm read lock on attribute changes to avoid UAF<br /> <br /> A previous commit protected against races between ptdump and CPA collapse,<br /> however one still exists between attribute changes and collapse as reported<br /> by Denis V. Lunev (linked).<br /> <br /> When an attribute change arises, a lockless page table walker obtains a PTE<br /> entry, which is later written to via set_pte_atomic():<br /> <br /> ...<br /> -&gt; change_page_attr_set_clr()<br /> -&gt; __change_page_attr_set_clr()<br /> -&gt; __change_page_attr()<br /> -&gt; _lookup_address_cpa()<br /> -&gt; lookup_address_in_pgd_attr()<br /> -&gt; [ lockless page table walker ]<br /> -&gt; set_pte_atomic()<br /> <br /> There is nothing preventing a concurrent CPA collapse which can free the<br /> PTE that was retrieved here, resulting in a use-after-free.<br /> <br /> With the mmap write lock taken on init_mm over CPA collapse, resolve this<br /> race by acquiring an mmap read lock on init_mm over<br /> __change_page_attr_set_clr().<br /> <br /> This locks across the whole operation over which the walk and the PTE<br /> entry write occurs, solving the race.<br /> <br /> It is safe to do this here, as no spinlocks are held upon entry to<br /> __change_page_attr_set_clr().<br /> <br /> However, the lock must not be held over an allocation, as allocation can<br /> trigger reclaim and shrinkers may call into CPA recursively, making<br /> deadlocks possible (init_mm -&gt; ... -&gt; fs_reclaim -&gt; init_mm).<br /> <br /> A page table is allocated when a huge page needs to be split:<br /> <br /> -&gt; change_page_attr_set_clr()<br /> -&gt; __change_page_attr_set_clr()<br /> -&gt; __change_page_attr()<br /> -&gt; split_large_page()<br /> [ pagetable_alloc() ]<br /> -&gt; __split_large_page()<br /> <br /> Avoid deadlocks by dropping the mmap lock across pagetable_alloc() in<br /> split_large_page() and track whether this is needed by adding a new<br /> &amp;#39;init_mm_read_locked&amp;#39; flag to struct cpa_data.<br /> <br /> This is safe as __split_large_page() (called with locks re-established)<br /> revalidates that the page table entry is the same as it was prior to the<br /> locks being dropped and __change_page_attr() repeats the entire page table<br /> walk whenever a split occurs, so concurrent split and collapse are<br /> accounted for.<br /> <br /> Concurrent ptdump is also safe as the lock is only dropped over page table<br /> allocation during which time the page table has not yet been modified.<br /> <br /> The CPA_COLLAPSE flag is only set by set_memory_rox(), which exclusively<br /> operates upon vmalloc ranges, and on x86 only within the module mapping<br /> space.<br /> <br /> This is important, because some callers directly invoke<br /> __change_page_attr_set_clr(), bypassing this lock. However, none of these<br /> operate within the module mapping space.<br /> <br /> * cpa_process_alias() - a recursive helper called by<br /> __change_page_attr_set_clr().<br /> * __set_memory_enc_pgtable() - operates on the direct mapping and (via<br /> __vmbus_establish_gpadl()) the vmalloc mapping space.<br /> * __set_pages_[n]p() - called by set_direct_map_[invalid, default,<br /> valid]_noflush(), __kernel_map_pages() - operates on the direct map.<br /> * kernel_[un]map_pages_in_pgd() - operates on EFI ranges.<br /> <br /> This work is based upon Denis V. Lunev&amp;#39;s excellent analysis of the bug<br /> with gratitude.<br /> <br /> [ dhansen: move to imperative voice in changelog ]

Impacto