В ядре Linux устранена следующая уязвимость:
MIPS: мм: исправлена запись за пределами границ в maar_res_walk().
maar_res_walk() использует wi->num_cfg в качестве индекса файла фиксированного размера.
массив wi->cfg, но проверяет, заполнен ли массив, только после того, как он
заполнил выбранную запись. Если walk_system_ram_range() сообщает больше, чем
16 диапазонов памяти, вызов переполнения записывает одну структуру maar_config в прошлое
конец массива перед WARN_ON() предотвращает продвижение num_cfg.
Переместите проверку всего массива перед тем, как занять слот массива, и верните ненулевое значение.
когда рабочий массив полон, поэтому walk_system_ram_range() завершает
walk вместо вызова обратного вызова для дальнейших диапазонов.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: MIPS: mm: Fix out-of-bounds write in maar_res_walk() maar_res_walk() uses wi->num_cfg as the index into the fixed-size wi->cfg array, but checks whether the array is full only after it has filled the selected entry. If walk_system_ram_range() reports more than 16 memory ranges, the overflow call writes one struct maar_config past the end of the array before WARN_ON() prevents num_cfg from advancing. Move the full-array check before taking the array slot and return non-zero when the scratch array is full, so walk_system_ram_range() terminates the walk instead of invoking the callback for further ranges.