android_kernel_sony_sdm845/drivers/video/console
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Peilin Ye 6f1adb22fc fbcon: Fix global-out-of-bounds read in fbcon_get_font()
commit 5af08640795b2b9a940c9266c0260455377ae262 upstream.

fbcon_get_font() is reading out-of-bounds. A malicious user may resize
`vc->vc_font.height` to a large value, causing fbcon_get_font() to
read out of `fontdata`.

fbcon_get_font() handles both built-in and user-provided fonts.
Fortunately, recently we have added FONT_EXTRA_WORDS support for built-in
fonts, so fix it by adding range checks using FNTSIZE().

This patch depends on patch "fbdev, newport_con: Move FONT_EXTRA_WORDS
macros into linux/font.h", and patch "Fonts: Support FONT_EXTRA_WORDS
macros for built-in fonts".

Cc: stable@vger.kernel.org
Reported-and-tested-by: syzbot+29d4ed7f3bdedf2aa2fd@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/b34544687a1a09d6de630659eb7a773f4953238b.1600953813.git.yepeilin.cs@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-14 09:48:14 +02:00
..
bitblit.c fbcon: remove now unusued 'softback_lines' cursor() argument 2020-09-23 08:46:12 +02:00
dummycon.c console/dummy: leave .con_font_get set to NULL 2018-02-22 15:43:49 +01:00
fbcon.c fbcon: Fix global-out-of-bounds read in fbcon_get_font() 2020-10-14 09:48:14 +02:00
fbcon.h fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h 2020-10-14 09:48:14 +02:00
fbcon_ccw.c fbcon: remove now unusued 'softback_lines' cursor() argument 2020-09-23 08:46:12 +02:00
fbcon_cw.c fbcon: remove now unusued 'softback_lines' cursor() argument 2020-09-23 08:46:12 +02:00
fbcon_rotate.c fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h 2020-10-14 09:48:14 +02:00
fbcon_rotate.h
fbcon_ud.c fbcon: remove now unusued 'softback_lines' cursor() argument 2020-09-23 08:46:12 +02:00
Kconfig vgacon: remove software scrollback support 2020-09-23 08:46:13 +02:00
Makefile
mdacon.c tty: vt, remove consw->con_bmove 2016-06-25 09:04:48 -07:00
newport_con.c fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h 2020-10-14 09:48:14 +02:00
softcursor.c
sticon.c tty: vt, remove consw->con_bmove 2016-06-25 09:04:48 -07:00
sticore.c
tileblit.c fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h 2020-10-14 09:48:14 +02:00
vgacon.c vgacon: remove software scrollback support 2020-09-23 08:46:13 +02:00