Thread (2 messages) 2 messages, 2 authors, 2017-03-09

[PATCH] security/Kconfig: further restrict HARDENED_USERCOPY

flat view
STALE3508d

From: Tycho Andersen <hidden>
Date: 2017-03-09 17:31:48
Also in: lkml
Subsystem: security subsystem, the rest · Maintainers: Paul Moore, James Morris, "Serge E. Hallyn", Linus Torvalds

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 <redacted>
CC: Kees Cook <redacted>
CC: "Serge E. Hallyn" <serge@hallyn.com>
CC: James Morris <redacted>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help