linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patchset to Restrict Unprivileged TIOCSTI TTY Command Injection
@ 2017-04-17  6:07 Matt Brown
  2017-04-17  6:07 ` [PATCH 1/4] added SECURITY_TIOCSTI_RESTRICT kernel config Matt Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Matt Brown @ 2017-04-17  6:07 UTC (permalink / raw)
  To: jmorris, gregkh, akpm
  Cc: linux-security-module, linux-kernel, kernel-hardening

The following patchset reproduces GRKERNSEC_HARDEN_TTY functionality from the grsecurity project in-kernel. The purpose of this feature is to restrict unprivileged users from injecting commands into other processes in the same tty session by using the TIOCSTI ioctl.

It creates the kernel config SECURITY_TIOCSTI_RESTRICT and the sysctl kernel.tiocsti_restrict to control this feature. I modeled most of the code style and naming conventions off of SECURITY_DMESG_RESTRICT.

 drivers/tty/tty_io.c |  4 ++++
 include/linux/tty.h  |  2 ++
 kernel/sysctl.c      | 12 ++++++++++++
 security/Kconfig     | 12 ++++++++++++
 4 files changed, 30 insertions(+)

[PATCH 1/4] added SECURITY_TIOCSTI_RESTRICT kernel config
[PATCH 2/4] add tiocsti_restrict variable
[PATCH 3/4] restrict unprivileged TIOCSTI tty ioctl
[PATCH 4/4] added kernel.tiocsti_restrict sysctl

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-18 15:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-17  6:07 Patchset to Restrict Unprivileged TIOCSTI TTY Command Injection Matt Brown
2017-04-17  6:07 ` [PATCH 1/4] added SECURITY_TIOCSTI_RESTRICT kernel config Matt Brown
2017-04-17  6:50   ` Greg KH
2017-04-18  4:29     ` Matt Brown
2017-04-18 13:40     ` Alan Cox
2017-04-18 15:49       ` [kernel-hardening] " Kees Cook
2017-04-17  6:07 ` [PATCH 2/4] add tiocsti_restrict variable Matt Brown
2017-04-17  6:51   ` Greg KH
2017-04-17  6:07 ` [PATCH 3/4] restrict unprivileged TIOCSTI tty ioctl Matt Brown
2017-04-17  6:53   ` Greg KH
2017-04-17 14:18     ` [kernel-hardening] " Jann Horn
2017-04-17 16:18       ` Matt Brown
2017-04-17  6:07 ` [PATCH 4/4] added kernel.tiocsti_restrict sysctl Matt Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).