diff options
author | Kees Cook <keescook@chromium.org> | 2017-08-05 00:34:40 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-08-15 22:27:35 +0300 |
commit | 93e78c6b14c42abe4018c815aeea2aa491522fae (patch) | |
tree | e45b36fdeb5f0daef6b312145783498ce96eba2f /drivers/misc/lkdtm_core.c | |
parent | 7b25a85c9d9f796c5be7ad3fb8b9553d3e2ed958 (diff) | |
download | linux-93e78c6b14c42abe4018c815aeea2aa491522fae.tar.xz |
lkdtm: Add -fstack-protector-strong test
There wasn't an LKDTM test to distinguish between -fstack-protector and
-fstack-protector-strong in use. This adds CORRUPT_STACK_STRONG to see
the difference. Also adjusts the stack-clobber value to 0xff so execution
won't potentially jump into userspace when the stack protector is missing.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/lkdtm_core.c')
-rw-r--r-- | drivers/misc/lkdtm_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm_core.c b/drivers/misc/lkdtm_core.c index 9e98d7ef5503..981b3ef71e47 100644 --- a/drivers/misc/lkdtm_core.c +++ b/drivers/misc/lkdtm_core.c @@ -201,6 +201,7 @@ struct crashtype crashtypes[] = { CRASHTYPE(CORRUPT_LIST_DEL), CRASHTYPE(CORRUPT_USER_DS), CRASHTYPE(CORRUPT_STACK), + CRASHTYPE(CORRUPT_STACK_STRONG), CRASHTYPE(STACK_GUARD_PAGE_LEADING), CRASHTYPE(STACK_GUARD_PAGE_TRAILING), CRASHTYPE(UNALIGNED_LOAD_STORE_WRITE), |