This is a note to let you know that I've just added the patch titled
tty: Reset hupped state on open
to the 3.12-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-reset-hupped-state-on-open.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a Mon Sep 17 00:00:00 2001
From: Peter Hurley <[email protected]>
Date: Tue, 19 Nov 2013 08:46:27 -0500
Subject: tty: Reset hupped state on open
From: Peter Hurley <[email protected]>
commit d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a upstream.
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 <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Tested-by: Heorhi Valakhanovich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/tty/tty_io.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2086,6 +2086,7 @@ retry_open:
filp->f_op = &tty_fops;
goto retry_open;
}
+ clear_bit(TTY_HUPPED, &tty->flags);
tty_unlock(tty);
Patches currently in stable-queue which might be from [email protected]
are
queue-3.12/n_tty-fix-4096-byte-canonical-reads.patch
queue-3.12/tty-incorrect-test-of-echo_buf-result-for-echo_op_start.patch
queue-3.12/n_tty-ensure-reader-restarts-worker-for-next-reader.patch
queue-3.12/tty-reset-hupped-state-on-open.patch
queue-3.12/n_tty-fix-echo-overrun-tail-computation.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html