From: Matt Brown <matt@nmatt.com>
To: jmorris@namei.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com, Matt Brown <matt@nmatt.com>
Subject: [PATCH 4/4] added kernel.tiocsti_restrict sysctl
Date: Mon, 17 Apr 2017 02:07:06 -0400 [thread overview]
Message-ID: <20170417060706.28674-5-matt@nmatt.com> (raw)
In-Reply-To: <20170417060706.28674-1-matt@nmatt.com>
this patch depends on patches 1, 2 and 3
Allow CONFIG_SECURITY_TIOCSTI_RESTRICT to be controlled via sysctl
Signed-off-by: Matt Brown <matt@nmatt.com>
---
kernel/sysctl.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index acf0a5a..68d1363 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -67,6 +67,7 @@
#include <linux/kexec.h>
#include <linux/bpf.h>
#include <linux/mount.h>
+#include <linux/tty.h>
#include <linux/uaccess.h>
#include <asm/processor.h>
@@ -833,6 +834,17 @@ static struct ctl_table kern_table[] = {
.extra2 = &two,
},
#endif
+#if defined CONFIG_TTY
+ {
+ .procname = "tiocsti_restrict",
+ .data = &tiocsti_restrict,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec_minmax_sysadmin,
+ .extra1 = &zero,
+ .extra2 = &one,
+ },
+#endif
{
.procname = "ngroups_max",
.data = &ngroups_max,
--
2.10.2
prev parent reply other threads:[~2017-04-17 6:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Matt Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170417060706.28674-5-matt@nmatt.com \
--to=matt@nmatt.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jmorris@namei.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).