drivers/tty: require read access for controlling terminal
authorJann Horn <jann@thejh.net>
Sun, 4 Oct 2015 17:29:12 +0000 (19:29 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 17 Nov 2015 15:54:42 +0000 (15:54 +0000)
commitdb0054fe613b21cd65c1609680cc47c520760044
tree9a9e59e4f690ad13d2234de5d465a4f7aa65d186
parent80910ccdd3ee35e4131df38bc73b86ee60abdf0b
drivers/tty: require read access for controlling terminal

commit 0c55627167870255158db1cde0d28366f91c8872 upstream.

This is mostly a hardening fix, given that write-only access to other
users' ttys is usually only given through setgid tty executables.

Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2:
 - __proc_set_tty() also takes a task_struct pointer]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/tty_io.c