В ядре Linux устранена следующая уязвимость:
из: Reserved_mem: избегать UAF после инициализации при сбое alloc_reserved_mem_array()
Глобальный указатель «reserved_mem» продолжает ссылаться на
Reserved_mem_array, который находится в __initdata, если
alloc_reserved_mem_array() завершается с ошибкой. of_reserved_mem_lookup() — это
экспортируется для использования после инициализации, что приведет к разыменованию освобожденной памяти
и вызвать использование после освобождения.
Поэтому сбросьте Reserved_mem_count в 0, когда alloc_reserved_mem_array()
терпит неудачу.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: of: reserved_mem: avoid post-init UAF when alloc_reserved_mem_array() fails The global pointer 'reserved_mem' continues to reference the reserved_mem_array which lives in __initdata if alloc_reserved_mem_array() fails. of_reserved_mem_lookup() is exported for post-init use, that would dereference freed memory and trigger a use-after-free. So reset reserved_mem_count to 0 when alloc_reserved_mem_array() fails.