CVE-2026-80627: MIPS: mm: Fix out-of-bounds write in maar_res_walk()
In the Linux kernel, the following vulnerability has been resolved:
MIPS: mm: Fix out-of-bounds write in maarreswalk()
maarreswalk() uses wi->numcfg 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 walksystemramrange() reports more than 16 memory ranges, the overflow call writes one struct maarconfig past the end of the array before WARNON() prevents numcfg from advancing.
Move the full-array check before taking the array slot and return non-zero when the scratch array is full, so walksystemramrange() terminates the walk instead of invoking the callback for further ranges.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel on MIPS are exposed when maar_res_walk() processes more than 16 memory ranges reported by walk_system_ram_range(). The affected code uses a fixed-size scratch array with 16 entries.
What condition is required to trigger the out-of-bounds write?
walk_system_ram_range() must report more than 16 memory ranges. Before the fix, the callback fills the selected array entry before checking whether the array is already full, causing one struct maar_config to be written past the array boundary.
How does the fix prevent additional out-of-bounds writes?
The fix checks whether the scratch array is full before selecting an array slot. When full, it returns a non-zero value so walk_system_ram_range() terminates the walk rather than invoking the callback for further ranges.