lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131119201952.2d63b8ce@tormoz-pc>
Date:	Tue, 19 Nov 2013 20:19:52 +0300
From:	Heorhi Valakhanovich <valahanovich@....by>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	gregkh@...uxfoundation.org
Subject: Re: [PATCH] tty: Only hangup once

On Tue, 19 Nov 2013 08:46:27 -0500
Peter Hurley <peter@...leysoftware.com> wrote:

> Would you please test the patch below and confirm the fix?
> 
> --->%---
> Subject: [PATCH] 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@....by>
> Signed-off-by: Peter Hurley <peter@...leysoftware.com>
> ---
>   drivers/tty/tty_io.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index 3a1a01a..c74a00a 100644
> --- 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);
> 
> 

It looks like this patch works. It solves my problem. Thanks.
Will wait for such fix in mainline.

Heorhi.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ