Files
android_kernel_xiaomi_sm8450/include/linux
Kees Cook f5509cc18d mm: Hardened usercopy
This is the start of porting PAX_USERCOPY into the mainline kernel. This
is the first set of features, controlled by CONFIG_HARDENED_USERCOPY. The
work is based on code by PaX Team and Brad Spengler, and an earlier port
from Casey Schaufler. Additional non-slab page tests are from Rik van Riel.

This patch contains the logic for validating several conditions when
performing copy_to_user() and copy_from_user() on the kernel object
being copied to/from:
- address range doesn't wrap around
- address range isn't NULL or zero-allocated (with a non-zero copy size)
- if on the slab allocator:
  - object size must be less than or equal to copy size (when check is
    implemented in the allocator, which appear in subsequent patches)
- otherwise, object must not span page allocations (excepting Reserved
  and CMA ranges)
- if on the stack
  - object must not extend before/after the current process stack
  - object must be contained by a valid stack frame (when there is
    arch/build support for identifying stack frames)
- object must not overlap with kernel text

Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
2016-07-26 14:41:47 -07:00
..
2016-03-04 23:50:27 -06:00
2015-12-23 08:37:10 -07:00
2016-03-15 16:55:16 -07:00
2016-06-07 22:07:09 -04:00
2016-02-16 13:04:58 -05:00
2016-06-01 14:56:57 -07:00
2016-05-31 22:12:43 +05:30
2016-05-17 15:48:12 -04:00
2016-07-13 11:53:40 -07:00
2015-12-28 13:41:50 +01:00
2015-11-25 09:22:00 -07:00
2016-04-06 13:18:19 +02:00
2016-03-11 14:58:58 -05:00
2016-02-11 09:59:22 -05:00
2016-03-22 15:36:02 -07:00
2016-05-11 19:31:40 -04:00
2016-05-11 22:37:54 +02:00
2016-01-28 14:19:12 -08:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-01-15 17:56:32 -08:00
2016-03-09 15:43:42 -08:00
2016-05-03 15:07:35 -07:00
2016-01-15 17:56:32 -08:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-07-26 14:41:46 -07:00
2016-05-17 15:48:12 -04:00
2016-05-17 15:47:55 -04:00
2016-05-23 17:04:14 -07:00
2016-04-25 15:09:11 -04:00
2016-02-16 13:04:58 -05:00
2016-05-02 09:00:56 -05:00
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-03-14 15:43:11 -04:00
2016-02-16 13:04:58 -05:00
2016-06-23 18:37:05 +02:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-01-10 22:13:15 -05:00
2016-05-26 00:04:58 -04:00
2016-01-04 16:11:11 -05:00
2016-05-19 19:12:14 -07:00
2016-07-26 14:41:47 -07:00
2016-05-08 23:46:14 -04:00
2016-05-20 17:58:30 -07:00
2016-07-26 14:41:47 -07:00
2016-05-19 19:12:14 -07:00
2016-05-23 17:04:14 -07:00
2016-04-07 16:53:29 -04:00
2015-11-23 09:44:58 +01:00
2016-05-20 17:58:30 -07:00
2016-02-22 16:10:08 -07:00
2015-12-03 07:24:29 -08:00