fbdev: sm501fb: Fix buffer errors in OF binding code
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4295f9bf74a885da390abc49a3b42a011c1bb890 · < de590cdf7efec8a0b6da90ae2ab5fc5df26810b9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fbdev: sm501fb: Fix buffer errors in OF binding code
The code that gets the frame buffer mode from OF has 'use after free', 'buffer overrun' and memory leaks.
info->edid_data isn't free if the probe functions fail or if pd->def_mode is set.
If both the CRT and PANEL are enabled info->edid_data is used after being freed and is freed twice.
The string returned by of_get_property(np, "mode", &len) is just written over either the static "640x480-16@60" or the module parameter string without any regard for the length (which is most likely longer).
Use kstrump() for the OF mode and free everything before freeing 'info.
From the CVE record · Linux
The Linux kernel's sm501fb OF binding code has a use-after-free, a buffer overrun, and memory leaks while reading the framebuffer mode. The use-after-free and double-free occur when both CRT and PANEL are enabled; the mode property can overrun its destination buffer. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the sm501fb driver should check whether their kernel includes this fix; affected versions are not specified.