OrangePi_CM5/drivers/tty/vt
Helge Deller 989201bb8c vt: Clear selection before changing the font
commit 566f9c9f89337792070b5a6062dff448b3e7977f 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 11:11:37 +02:00
..
.gitignore
Makefile
conmakehash.c
consolemap.c vt/consolemap: do font sum unsigned 2021-03-07 12:34:09 +01:00
cp437.uni
defkeymap.c_shipped
defkeymap.map
keyboard.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:19:27 +02:00
selection.c vc: propagate "viewed as bool" from screenpos up 2020-08-18 13:45:20 +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 11:11:37 +02:00
vt_ioctl.c vt: drop old FONT ioctls 2022-06-29 08:59:44 +02:00