diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-07 14:03:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-07 14:03:49 -0700 |
commit | 80a77045daacc660659093b312ca0708b53ed558 (patch) | |
tree | c0c4147c449b493946be39e2147f9732594956c2 /security/Kconfig | |
parent | ab29b33a84f6910ebf01a32f69a370886a4283dd (diff) | |
parent | 8e1f74ea02cf4562404c48c6882214821552c13f (diff) |
Merge tag 'usercopy-v4.8-rc6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull more hardened usercopyfixes from Kees Cook:
- force check_object_size() to be inline too
- move page-spanning check behind a CONFIG since it's triggering false
positives
[ Changed the page-spanning config option to depend on EXPERT in the
merge. That way it still gets build testing, and you can enable it if
you want to, but is never enabled for "normal" configurations ]
* tag 'usercopy-v4.8-rc6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
usercopy: remove page-spanning test for now
usercopy: force check_object_size() inline
Diffstat (limited to 'security/Kconfig')
-rw-r--r-- | security/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/security/Kconfig b/security/Kconfig index da10d9b573a4..118f4549404e 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -147,6 +147,17 @@ config HARDENED_USERCOPY or are part of the kernel text. This kills entire classes of heap overflow exploits and similar kernel memory exposures. +config HARDENED_USERCOPY_PAGESPAN + bool "Refuse to copy allocations that span multiple pages" + depends on HARDENED_USERCOPY + depends on EXPERT + help + When a multi-page allocation is done without __GFP_COMP, + hardened usercopy will reject attempts to copy it. There are, + however, several cases of this in the kernel that have not all + been removed. This config is intended to be used only while + trying to find such users. + source security/selinux/Kconfig source security/smack/Kconfig source security/tomoyo/Kconfig |