Commit 566f9c9
vt: Clear selection before changing the font
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>1 parent b5a5b9d commit 566f9c9
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4662 | 4662 | | |
4663 | 4663 | | |
4664 | 4664 | | |
4665 | | - | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
4666 | 4668 | | |
4667 | | - | |
| 4669 | + | |
4668 | 4670 | | |
4669 | 4671 | | |
4670 | 4672 | | |
| |||
4691 | 4693 | | |
4692 | 4694 | | |
4693 | 4695 | | |
4694 | | - | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
4695 | 4699 | | |
4696 | | - | |
| 4700 | + | |
4697 | 4701 | | |
4698 | 4702 | | |
4699 | 4703 | | |
| |||
0 commit comments