diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2016-09-07 14:37:52 -0700 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-09-07 14:37:52 -0700 |
| commit | cade80573cf8a76e46a95f8a714dd264c67bcb96 (patch) | |
| tree | 7e7b236076db5b9f6630a3269d5cdc02a2adfb08 /security | |
| parent | 5c0fc54c9b67e04d533b5ebec718d37f747a9170 (diff) | |
| parent | 6b93f8214eabf0f363eab5283c2ad18b5bc33135 (diff) | |
Merge remote-tracking branch 'common/android-4.4' into android-4.4.y
Diffstat (limited to 'security')
| -rw-r--r-- | security/Kconfig | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/security/Kconfig b/security/Kconfig index 30a2603e8c85..2b42c225de28 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -127,6 +127,35 @@ config LSM_MMAP_MIN_ADDR this low address space will need the permission specific to the systems running LSM. +config HAVE_HARDENED_USERCOPY_ALLOCATOR + bool + help + The heap allocator implements __check_heap_object() for + validating memory ranges against heap object sizes in + support of CONFIG_HARDENED_USERCOPY. + +config HAVE_ARCH_HARDENED_USERCOPY + bool + help + The architecture supports CONFIG_HARDENED_USERCOPY by + calling check_object_size() just before performing the + userspace copies in the low level implementation of + copy_to_user() and copy_from_user(). + +config HARDENED_USERCOPY + bool "Harden memory copies between kernel and userspace" + depends on HAVE_ARCH_HARDENED_USERCOPY + depends on HAVE_HARDENED_USERCOPY_ALLOCATOR + select BUG + help + This option checks for obviously wrong memory regions when + copying memory to/from the kernel (via copy_to_user() and + copy_from_user() functions) by rejecting memory ranges that + are larger than the specified heap object, span multiple + separately allocates pages, are not on the process stack, + or are part of the kernel text. This kills entire classes + of heap overflow exploits and similar kernel memory exposures. + source security/selinux/Kconfig source security/smack/Kconfig source security/tomoyo/Kconfig |
