WSL2-Linux-Kernel/drivers/tty/vt
Helge Deller 2535431ae9 vt: Clear selection before changing the font
commit 566f9c9f89 upstream.

When changing the console font with ioctl(KDFONTOP) the new font size
can be bigger than the previous font. A previous selection may thus now
be outside of the new screen size and thus trigger out-of-bounds
accesses to graphics memory if the selection is removed in
vc_do_resize().

Prevent such out-of-memory accesses by dropping the selection before the
various con_font_set() console handlers are called.

Reported-by: syzbot+14b0e8f3fd1612e35350@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Tested-by: Khalid Masum <khalid.masum.92@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Link: https://lore.kernel.org/r/YuV9apZGNmGfjcor@p100
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-08 12:28:03 +02:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Makefile kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
conmakehash.c tty: vt: move conmakehash to drivers/tty/vt/ from scripts/ 2019-12-17 14:42:46 +01:00
consolemap.c vt/consolemap: do font sum unsigned 2021-01-07 16:17:31 +01:00
cp437.uni tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
defkeymap.c_shipped vt: keyboard, defkeymap.c_shipped, approach the unicode table 2021-01-07 16:17:31 +01:00
defkeymap.map tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
keyboard.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:25:31 +02:00
selection.c tty: vt: selection: Correct misspelled function sel_loadlut() 2021-05-20 17:05:33 +02:00
vc_screen.c Revert "vc_screen: extract vcs_read_buf_header" 2020-08-24 19:51:56 +02:00
vt.c vt: Clear selection before changing the font 2022-09-08 12:28:03 +02:00
vt_ioctl.c vt_ioctl: add array_index_nospec to VT_ACTIVATE 2022-02-16 12:56:33 +01:00