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


Groups > linux.kernel > #1596234

[PATCH] security/Kconfig: further restrict HARDENED_USERCOPY

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Tycho Andersen <tycho@docker.com>
Newsgroups linux.kernel
Subject [PATCH] security/Kconfig: further restrict HARDENED_USERCOPY
Date Thu, 09 Mar 2017 18:40:01 +0100
Message-ID <tjacF-8oc-1@gated-at.bofh.it> (permalink)
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=docker.com; s=google; h=from:to:cc:subject:date:message-id; bh=9werAetMQniXWGLiYHo63FUVDdaSl63mIovTHvqudBc=; b=FWMb/viCwHg0pdlP1cn3KGROk77Gp+FWpl1d5wKGye3mp5FLoi6qwK3HYCX3bvwRum fujR6pvw5gOK3L8kOD88ymqW35O0vOkCO3D/PhPfF5L1fpnJ7byfUlLvIvjoIUNKX9xK G2aPu4yIBmC62xAlogquIxD3xG1kV1moh2hhE=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9werAetMQniXWGLiYHo63FUVDdaSl63mIovTHvqudBc=; b=TovfVJHVxreb2mQGyEwrKmKvWnHgkctqv6+dlGuevUl6wykjQkho0fzVupOtHwfPa8 fhvfn0U+3ydRx4W0GQKefVWmzy2ptjwxcFGhkz2L1wBSLjIEh9is1c9RmkZDvWRgXDIn 6BYuvF6CP0uOXSTb/T15Volj2FUqCV+4+ihFj/H8UKPla3iJBEy104tde2xoIifpjjUu tF09EpbnbqODSrEcKIwM8WOZ1MdyFvG+86lMOyEU0aPXfL23IgSTCiFqGT7BfJ7PW4aC sz44C4pscwzInwF9gwWtrrz634AJVC/L8wRLgb/XaSj9bC/TiCWroGsSnVZ5OuQZyLSq Tj7Q==
X-Gm-Message-State AMke39kYrlnJ7bsvGQm+9kK8Rhaj9X44lBi/Hfxy5bFBDWkq2g+TiLWSpIoEpOMrDelczgCF
X-Received by 10.99.199.69 with SMTP id v5mr15016882pgg.90.1489080600315; Thu, 09 Mar 2017 09:30:00 -0800 (PST)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 28
Organization linux.* mail to news gateway
X-Original-Cc linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Tycho Andersen <tycho@docker.com>, "Serge E. Hallyn" <serge@hallyn.com>
X-Original-Date Thu, 9 Mar 2017 09:29:21 -0800
X-Original-Message-ID <1489080561-30786-1-git-send-email-tycho@docker.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1596234

Show key headers only | View raw


It doesn't make sense to have HARDENED_USERCOPY when either /dev/kmem is
enabled or /dev/mem can be used to read kernel memory.

v2: add !MMU depend as well

Signed-off-by: Tycho Andersen <tycho@docker.com>
CC: Kees Cook <keescook@chromium.org>
CC: "Serge E. Hallyn" <serge@hallyn.com>
CC: James Morris <james.l.morris@oracle.com>
---
 security/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/Kconfig b/security/Kconfig
index 3ff1bf9..aeabd40 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -142,6 +142,8 @@ config HARDENED_USERCOPY
 	bool "Harden memory copies between kernel and userspace"
 	depends on HAVE_ARCH_HARDENED_USERCOPY
 	depends on HAVE_HARDENED_USERCOPY_ALLOCATOR
+	depends on !DEVKMEM
+	depends on !ARCH_HAS_DEVMEM_IS_ALLOWED || STRICT_DEVMEM || !MMU
 	select BUG
 	help
 	  This option checks for obviously wrong memory regions when
-- 
2.7.4

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


Thread

[PATCH] security/Kconfig: further restrict HARDENED_USERCOPY Tycho Andersen <tycho@docker.com> - 2017-03-09 18:40 +0100
  Re: [PATCH] security/Kconfig: further restrict HARDENED_USERCOPY Kees Cook <keescook@chromium.org> - 2017-03-09 20:20 +0100

csiph-web