lkdtm/heap: add tests for freelist hardening
authorKees Cook <keescook@chromium.org>
Fri, 12 Jul 2019 03:53:29 +0000 (20:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jul 2019 18:05:41 +0000 (11:05 -0700)
commit966fede8e4be15bcc08e3c390080d3f9072a5367
tree93fcad54232f4e760a1d5bd6ae6ecf1ba1e5a7f7
parenta64b53780ec35b77daf817210c88aa42d172c98f
lkdtm/heap: add tests for freelist hardening

This adds tests for double free and cross-cache freeing, which should both
be caught by CONFIG_SLAB_FREELIST_HARDENED.

Link: http://lkml.kernel.org/r/20190530045017.15252-4-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Alexander Popov <alex.popov@linux.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/heap.c
drivers/misc/lkdtm/lkdtm.h