В ядре Linux была устранена следующая уязвимость: mm/vmalloc, mm/kasan: respect gfp mask in kasan_populate_vmalloc() kasan_populate_vmalloc() и его помощники игнорируют вызывающий gfp_mask и всегда выделяют память, используя жёстко закодированный флаг GFP_KERNEL. Это делает их несовместимыми с vmalloc(), который недавно был расширен для поддержки распределений GFP_NOFS и GFP_NOIO. Распределение таблиц страниц, выполняемое во время теневой популяции, также игнорирует внешний gfp_mask.
Чтобы сохранить предполагаемую семантику GFP_NOFS и GFP_NOIO, оберните вызовы apply_to_page_range() в соответствующую область memalloc. xfs вызывает vmalloc с GFP_NOFS, поэтому эта ошибка может привести к тупику. Там был отчет https://lkml.kernel.org/r/686ea951.050a0220.385921.0016.GAE@google.com This патч: - Extends kasan_populate_vmalloc() и помощники, чтобы взять gfp_mask; - Passes gfp_mask вниз до alloc_pages_bulk() и __get_free_page(); - Enforces GFP_NOFS/NOIO семантика с memalloc_*_save()/restore() вокруг apply_to_page_range(); - Updates vmalloc.c и percpu allocator вызов сайтов соответственно.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan: respect gfp mask in kasan_populate_vmalloc() kasan_populate_vmalloc() and its helpers ignore the caller's gfp_mask and always allocate memory using the hardcoded GFP_KERNEL flag. This makes them inconsistent with vmalloc(), which was recently extended to support GFP_NOFS and GFP_NOIO allocations. Page table allocations performed during shadow population also ignore the external gfp_mask. To preserve the intended semantics of GFP_NOFS and GFP_NOIO, wrap the apply_to_page_range() calls into the appropriate memalloc scope. xfs calls vmalloc with GFP_NOFS, so this bug could lead to deadlock. There was a report here https://lkml.kernel.org/r/686ea951.050a0220.385921.0016.GAE@google.com This patch: - Extends kasan_populate_vmalloc() and helpers to take gfp_mask; - Passes gfp_mask down to alloc_pages_bulk() and __get_free_page(); - Enforces GFP_NOFS/NOIO semantics with memalloc_*_save()/restore() around apply_to_page_range(); - Updates vmalloc.c and percpu allocator call sites accordingly.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.17
|
6.16.8
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*
|
— | — |