From patchwork Mon Apr 17 06:07:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Brown X-Patchwork-Id: 9683619 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A7E4600C5 for ; Mon, 17 Apr 2017 06:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BD3927CF9 for ; Mon, 17 Apr 2017 06:08:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60AFF27EED; Mon, 17 Apr 2017 06:08:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CA7827CF9 for ; Mon, 17 Apr 2017 06:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933016AbdDQGHq (ORCPT ); Mon, 17 Apr 2017 02:07:46 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:38845 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbdDQGHo (ORCPT ); Mon, 17 Apr 2017 02:07:44 -0400 Received: from mfilter16-d.gandi.net (mfilter16-d.gandi.net [217.70.178.144]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id CC2C8C5A55; Mon, 17 Apr 2017 08:07:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter16-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter16-d.gandi.net (mfilter16-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id bOacUwv-OH77; Mon, 17 Apr 2017 08:07:41 +0200 (CEST) X-Originating-IP: 72.66.113.207 Received: from vfio.nmatt.com.com (pool-72-66-113-207.washdc.fios.verizon.net [72.66.113.207]) (Authenticated sender: matt@nmatt.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id C4FEDC5A49; Mon, 17 Apr 2017 08:07:39 +0200 (CEST) From: Matt Brown 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 Subject: [PATCH 1/4] added SECURITY_TIOCSTI_RESTRICT kernel config Date: Mon, 17 Apr 2017 02:07:03 -0400 Message-Id: <20170417060706.28674-2-matt@nmatt.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170417060706.28674-1-matt@nmatt.com> References: <20170417060706.28674-1-matt@nmatt.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP adding the kernel config SECURITY_TIOCSTI_RESTRICT in order to allow the user to restrict unprivileged command injection using TIOCSTI tty ioctls Signed-off-by: Matt Brown --- security/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/security/Kconfig b/security/Kconfig index 3ff1bf9..d757bcb 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -18,6 +18,18 @@ config SECURITY_DMESG_RESTRICT If you are unsure how to answer this question, answer N. +config SECURITY_TIOCSTI_RESTRICT + bool "Restrict unprivileged use of tiocsti command injection" + default n + help + This enforces restrictions on unprivileged users injecting commands + into other processes in the same tty session using the TIOCSTI ioctl + + If this option is not selected, no restrictions will be enforced + unless the tiocsti_restrict sysctl is explicitly set to (1). + + If you are unsure how to answer this question, answer N. + config SECURITY bool "Enable different security models" depends on SYSFS