MIPS: mm: Fix out-of-bounds write in maar_res_walk()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a5718fe8f70f33b1b5b47a153057cfdd19684598 · < 92f38fe85198ace9b211bc7712b7951acfb94560| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s MIPS maar_res_walk() writes past a fixed-size array if the system RAM walk reports more than 16 memory ranges. This can cause an out-of-bounds write; the input does not establish an attacker-controlled trigger, access requirements, or user interaction.
Engineers running the Linux kernel on MIPS systems should check affected kernel versions; none are specified in the input.