CVE-2026-74320: fbdev: sm501fb: Fix buffer errors in OF binding code
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-74320 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 5.10.261 with commit 0bc3d909a49e1fd8b8c3f2160d526e672c40621d Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 5.15.212 with commit 47008d59c60ed896085da95f8d4dd40e1677dd3a Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 6.1.178 with commit d374f76e1257ecc5d691a765c512ed2c29a44741 Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 6.6.145 with commit b2ff450f7f5cfc7143cab57c3ad70293ba8b822a Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 6.12.97 with commit 9057e3f5db39f0ef0dac2f59f2bc59bf17e36c31 Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 6.18.40 with commit de590cdf7efec8a0b6da90ae2ab5fc5df26810b9 Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 7.1.5 with commit 48cf0f4c6581ec90104cec9c5bf794a8bf347e30 Issue introduced in 2.6.39 with commit 4295f9bf74a885da390abc49a3b42a011c1bb890 and fixed in 7.2-rc1 with commit d8421e09382cfe0bd2a044c8b0a822f64855dd4e
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-74320
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/video/fbdev/sm501fb.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/0bc3d909a49e1fd8b8c3f2160d526e672c40621d https://git.kernel.org/stable/c/47008d59c60ed896085da95f8d4dd40e1677dd3a https://git.kernel.org/stable/c/d374f76e1257ecc5d691a765c512ed2c29a44741 https://git.kernel.org/stable/c/b2ff450f7f5cfc7143cab57c3ad70293ba8b822a https://git.kernel.org/stable/c/9057e3f5db39f0ef0dac2f59f2bc59bf17e36c31 https://git.kernel.org/stable/c/de590cdf7efec8a0b6da90ae2ab5fc5df26810b9 https://git.kernel.org/stable/c/48cf0f4c6581ec90104cec9c5bf794a8bf347e30 https://git.kernel.org/stable/c/d8421e09382cfe0bd2a044c8b0a822f64855dd4e