linux-stable/include
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
..
acpi Revert "ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis" 2016-07-11 16:21:08 +02:00
asm-generic vmlinux.lds: account for destructor sections 2016-07-15 14:54:27 +09:00
clocksource
crypto
drm Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes 2016-07-15 13:51:55 +10:00
dt-bindings
keys
kvm arm64: KVM: fix build with CONFIG_ARM_PMU disabled 2016-06-27 12:55:51 +02:00
linux mm: Hardened usercopy 2016-07-26 14:41:47 -07:00
math-emu
media
memory
misc
net net: switchdev: change ageing_time type to clock_t 2016-07-19 16:49:20 -07:00
pcmcia
ras
rdma IB/rdmavt: Correct qp_priv_alloc() return value test 2016-06-23 10:16:15 -04:00
rxrpc
scsi
soc
sound
target
trace
uapi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-07-16 07:04:12 +09:00
video
xen
Kbuild