mm: SLAB hardened usercopy support
authorKees Cook <keescook@chromium.org>
Thu, 23 Jun 2016 22:20:59 +0000 (15:20 -0700)
committerAlex Shi <alex.shi@linaro.org>
Sat, 27 Aug 2016 03:23:38 +0000 (11:23 +0800)
commit784bd0f8d7303ff0025e2ea44b68b6fc6323544d
tree319412450f6b10353b1cf5e7a30bb4cc443c4c0e
parent41e3ca9b2fc29b61dda146c9ba79736ba11e28e8
mm: SLAB hardened usercopy support

Under CONFIG_HARDENED_USERCOPY, this adds object size checking to the
SLAB allocator to catch any copies that may span objects.

Based on code from PaX and grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
(cherry picked from commit 04385fc5e8fffed84425d909a783c0f0c587d847)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
init/Kconfig
mm/slab.c