Patch "tty: limit terminal size to 4M chars" has been added to the 4.8-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
tty: limit terminal size to 4M chars
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tty-limit-terminal-size-to-4m-chars.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
32b2921e6a7461fe63b71217067a6cf4bddb132fMon Sep 17 00:00:00 2001
From: Dmitry Vyukov <[email protected]>
Date: Fri, 14 Oct 2016 15:18:28 +0200
Subject: tty: limit terminal size to 4M chars
From: Dmitry Vyukov <[email protected]>
commit 32b2921e6a7461fe63b71217067a6cf4bddb132f upstream.
Size of kmalloc() in vc_do_resize() is controlled by user. Too large kmalloc() size triggers WARNING message on console. Put a reasonable upper bound on terminal size to prevent WARNINGs.
--- drivers/tty/vt/vt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/vt/vt.c +2 -0
@@ -870,6 +870,8 @@ static int vc_do_resize(struct tty_strucif (new_cols == vc->vc_cols && new_rows == vc->vc_rows)return 0 ; +if (new_screen_size > (4 <<20 )) +return -EINVAL ; newscreen =kmalloc (new_screen_size,GFP_USER );if (!newscreen)return -ENOMEM ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/tty-limit-terminal-size-to-4m-chars.patch queue-4.8/vt-clear-selection-before-resizing.patch