linux/drivers/video
Tetsuo Handa 73d58890be fbcon: Fix user font detection test at fbcon_resize().
[ Upstream commit ec0972adec ]

syzbot is reporting OOB read at fbcon_resize() [1], for
commit 39b3cffb8c ("fbcon: prevent user font height or width change
 from causing potential out-of-bounds access") is by error using
registered_fb[con2fb_map[vc->vc_num]]->fbcon_par->p->userfont (which was
set to non-zero) instead of fb_display[vc->vc_num].userfont (which remains
zero for that display).

We could remove tricky userfont flag [2], for we can determine it by
comparing address of the font data and addresses of built-in font data.
But since that commit is failing to fix the original OOB read [3], this
patch keeps the change minimal in case we decide to revert altogether.

[1] https://syzkaller.appspot.com/bug?id=ebcbbb6576958a496500fee9cf7aa83ea00b5920
[2] https://syzkaller.appspot.com/text?tag=Patch&x=14030853900000
[3] https://syzkaller.appspot.com/bug?id=6fba8c186d97cf1011ab17660e633b1cc4e080c9

Reported-by: syzbot <syzbot+b38b1ef6edf0c74a8d97@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 39b3cffb8c ("fbcon: prevent user font height or width change from causing potential out-of-bounds access")
Cc: George Kennedy <george.kennedy@oracle.com>
Link: https://lore.kernel.org/r/f6e3e611-8704-1263-d163-f52c906a4f06@I-love.SAKURA.ne.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 12:40:41 +02:00
..
backlight backlight: lp855x: Ensure regulators are disabled on probe failure 2020-06-24 17:50:09 +02:00
console vgacon: remove software scrollback support 2020-09-17 13:47:54 +02:00
fbdev fbcon: Fix user font detection test at fbcon_resize(). 2020-09-23 12:40:41 +02:00
logo
Kconfig
Makefile
display_timing.c
hdmi.c video/hdmi: Fix AVI bar unpack 2019-12-17 19:56:42 +01:00
of_display_timing.c
of_videomode.c
vgastate.c
videomode.c