linux/arch/alpha
Aleksa Sarai 54ebbfb160 tty: add TIOCGPTPEER ioctl
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-09 12:27:54 +02:00
..
boot Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
include tty: add TIOCGPTPEER ioctl 2017-06-09 12:27:54 +02:00
kernel osf_wait4(): fix infoleak 2017-05-21 13:10:07 -04:00
lib Kbuild updates for v4.12 2017-05-10 20:11:05 -07:00
math-emu sched/headers: Prepare for the removal of <asm/ptrace.h> from <linux/sched.h> 2017-03-02 08:42:31 +01:00
mm sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
oprofile alpha: delete non-required instances of <linux/init.h> 2015-05-26 10:01:48 -07:00
Kconfig CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now 2017-04-26 12:11:01 -04:00
Kconfig.debug alpha/parisc: remove config variable DEBUG_RWLOCK 2008-02-06 10:41:03 -08:00
Makefile alpha: makefile: don't enforce small data model for kernel builds 2013-04-07 12:59:30 -07:00
defconfig defconfig reduction 2010-08-14 22:26:53 +02:00