В ядре Linux была устранена следующая уязвимость: mm/mm_init: ошибка обработки alloc_percpu в free_area_init_core_hotplug We пропустить неудавшуюся проверку распределения для pgdat->per_cpu_nodestats, что приводит к отклонению NULL, когда мы смещаемся в область per-cpu. Propagate -ENOMEM вверх по стеку и оставить per_cpu_nodestats, указывая на boot_nodestats, так что более поздний онлайн может повторить выделение. hotadd_init_pgdat() возвращает NULL при сбое, который __try_online_node() уже отображает в -ENOMEM. При неудаче ничего не должно быть размотано: - узел никогда не помечается в сети - per_cpu_nodestats остается, указывая на boot_nodestats - __add_memory_resource() очищает ожидающие ресурсы memblock - позже онлайн попытки повторить выделение per_cpu_nodestats
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: mm/mm_init: handle alloc_percpu failure in free_area_init_core_hotplug We miss a failed allocation check for pgdat->per_cpu_nodestats, which results in a NULL deref when we offset into the per-cpu area. Propagate -ENOMEM up the stack and leave per_cpu_nodestats pointing at boot_nodestats so a later online can retry the allocation. hotadd_init_pgdat() returns NULL on failure, which __try_online_node() already maps to -ENOMEM. On failure nothing needs to be unwound: - the node is never marked online - per_cpu_nodestats is left pointing at boot_nodestats - __add_memory_resource() cleans up pending memblock resources - later online attempts retry the per_cpu_nodestats allocation