aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/core.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2021-10-22 22:38:26 +0000
committerGreg Kroah-Hartman <[email protected]>2021-10-25 07:13:46 +0000
commitd46e58ef776bc6548b17b563ec4a8ed30c6643da (patch)
tree9310e618184c42ca467919ae2818163f53a004ac /drivers/misc/lkdtm/core.c
parentselftests/lkdtm: Add way to repeat a test (diff)
downloadkernel-d46e58ef776bc6548b17b563ec4a8ed30c6643da.tar.gz
kernel-d46e58ef776bc6548b17b563ec4a8ed30c6643da.zip
lkdtm/bugs: Check that a per-task stack canary exists
Introduce REPORT_STACK_CANARY to check for differing stack canaries between two processes (i.e. that an architecture is correctly implementing per-task stack canaries), using the task_struct canary as the hint to locate in the stack. Requires that one of the processes being tested not be pid 1. Cc: Ard Biesheuvel <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/misc/lkdtm/core.c')
-rw-r--r--drivers/misc/lkdtm/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
index fe6fd34b8caf..609d9ee2acc0 100644
--- a/drivers/misc/lkdtm/core.c
+++ b/drivers/misc/lkdtm/core.c
@@ -111,6 +111,7 @@ static const struct crashtype crashtypes[] = {
CRASHTYPE(CORRUPT_STACK),
CRASHTYPE(CORRUPT_STACK_STRONG),
CRASHTYPE(REPORT_STACK),
+ CRASHTYPE(REPORT_STACK_CANARY),
CRASHTYPE(CORRUPT_LIST_ADD),
CRASHTYPE(CORRUPT_LIST_DEL),
CRASHTYPE(STACK_GUARD_PAGE_LEADING),