Patch "fbdev: controlfb: Add missing modes to fix out of bounds access" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
fbdev: controlfb: Add missing modes to fix out of bounds access
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
fbdev-controlfb-add-missing-modes-to-fix-out-of-bounds-access.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Geert Uytterhoeven <[email protected]>
Date: Thu, 9 Nov 2017 18:09:33 +0100
Subject: fbdev: controlfb: Add missing modes to fix out of bounds access
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit ac831a379d34109451b3c41a44a20ee10ecb615f ]
Dan's static analysis says:
drivers/video/fbdev/controlfb.c:560 control_setup()
error: buffer overflow 'control_mac_modes' 20 <= 21
Indeed, control_mac_modes[] has only 20 elements, while VMODE_MAX is 22, which may lead to an out of bounds read when parsing vmode commandline options.
The bug was introduced in v2.4.5.6, when 2 new modes were added to macmodes.h, but control_mac_modes[] wasn't updated:
Augment control_mac_modes[] with the two new video modes to fix this.
--- drivers/video/fbdev/controlfb.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/video/fbdev/controlfb.h +2 -0
@@ -141,5 +141,7 @@ static struct max_cmodes control_mac_mod {{ 1, 2}}, /* 1152x870, 75Hz */ {{ 0, 1}}, /* 1280x960, 75Hz */ {{ 0, 1}}, /* 1280x1024, 75Hz */ + {{ 1, 2}}, /* 1152x768, 60Hz */ + {{ 0, 1}}, /* 1600x1024, 60Hz */ };
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/fbdev-controlfb-add-missing-modes-to-fix-out-of-bounds-access.patch queue-4.14/mtd-spi-nor-stm32-quadspi-fix-uninitialized-error-return-code.patch