diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-11-19 14:46:27 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 17:56:49 +0100 |
commit | d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a (patch) | |
tree | d518a39edafd6f58befb8d9f048ae8294b97b0b0 /drivers/tty/n_tty.c | |
parent | TTY: amiserial, add missing platform check (diff) | |
download | linux-d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a.tar.xz linux-d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a.zip |
tty: Reset hupped state on open
A common security idiom is to hangup the current tty (via vhangup())
after forking but before execing a root shell. This hangs up any
existing opens which other processes may have and ensures subsequent
opens have the necessary permissions to open the root shell tty/pty.
Reset the TTY_HUPPED state after the driver has successfully
returned the opened tty (perform the reset while the tty is locked
to avoid racing with concurrent hangups).
Reported-by: Heorhi Valakhanovich <valahanovich@tut.by>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org> # 3.12
Tested-by: Heorhi Valakhanovich <valahanovich@tut.by>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
0 files changed, 0 insertions, 0 deletions