summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm_core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-08-17 14:42:12 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2016-10-31 13:01:58 -0700
commit6819d101dd739dd4e8cbe60a98c9ebb224ecc992 (patch)
tree04823cf711bbe51cad6a4227b3ca14459fbb1336 /drivers/misc/lkdtm_core.c
parentde54ebbe26bb371a6f1fbc0593372232f04e3107 (diff)
downloadlinux-6819d101dd739dd4e8cbe60a98c9ebb224ecc992.tar.gz
linux-6819d101dd739dd4e8cbe60a98c9ebb224ecc992.tar.bz2
linux-6819d101dd739dd4e8cbe60a98c9ebb224ecc992.zip
lkdtm: Add tests for struct list corruption
When building under CONFIG_DEBUG_LIST, list addition and removal will be sanity-checked. This validates that the check is working as expected by setting up classic corruption attacks against list manipulations, available with the new lkdtm tests CORRUPT_LIST_ADD and CORRUPT_LIST_DEL. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Rik van Riel <riel@redhat.com>
Diffstat (limited to 'drivers/misc/lkdtm_core.c')
-rw-r--r--drivers/misc/lkdtm_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm_core.c b/drivers/misc/lkdtm_core.c
index f9154b8d67f6..7eeb71a75549 100644
--- a/drivers/misc/lkdtm_core.c
+++ b/drivers/misc/lkdtm_core.c
@@ -197,6 +197,8 @@ struct crashtype crashtypes[] = {
CRASHTYPE(EXCEPTION),
CRASHTYPE(LOOP),
CRASHTYPE(OVERFLOW),
+ CRASHTYPE(CORRUPT_LIST_ADD),
+ CRASHTYPE(CORRUPT_LIST_DEL),
CRASHTYPE(CORRUPT_STACK),
CRASHTYPE(UNALIGNED_LOAD_STORE_WRITE),
CRASHTYPE(OVERWRITE_ALLOCATION),