Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662171

Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl
Date 2017-06-09 11:30 +0200
Message-ID <tQooV-8bH-7@gated-at.bofh.it> (permalink)
References <tOi4h-850-5@gated-at.bofh.it> <tOi4h-850-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Jun 04, 2017 at 12:15:15AM +1000, Aleksa Sarai wrote:
> When opening the slave end of a PTY, it is not possible for userspace to
> safely ensure that /dev/pts/$num is actually a slave (in cases where the
> mount namespace in which devpts was mounted is controlled by an
> untrusted process). In addition, there are several unresolvable
> race conditions if userspace were to attempt to detect attacks through
> stat(2) and other similar methods [in addition it is not clear how
> userspace could detect attacks involving FUSE].
> 
> Resolve this by providing an interface for userpace to safely open the
> "peer" end of a PTY file descriptor by using the dentry cached by
> devpts. Since it is not possible to have an open master PTY without
> having its slave exposed in /dev/pts this interface is safe. This
> interface currently does not provide a way to get the master pty (since
> it is not clear whether such an interface is safe or even useful).
> 
> Cc: Christian Brauner <christian.brauner@ubuntu.com>
> Cc: Valentin Rothberg <vrothberg@suse.com>
> Signed-off-by: Aleksa Sarai <asarai@suse.de>

Is this going to be documented anywhere?  Is there a man page update
that also goes along with this?  What userspace program wants to use
this?

I'm not objecting to this, I just want to know that people will use
this, and that they can find out information about it if they want to.

thanks,

greg k-h

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:30 +0200
  Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl Aleksa Sarai <asarai@suse.de> - 2017-06-09 12:00 +0200
    Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 12:10 +0200
      Re: [PATCH v4 2/2] tty: add TIOCGPTPEER ioctl Aleksa Sarai <asarai@suse.de> - 2017-06-09 12:30 +0200

csiph-web