diff options
| author | Kees Cook <[email protected]> | 2020-04-07 03:12:34 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-04-07 17:43:44 +0000 |
| commit | ae2e1aad3e48e495878d9f149e437a308bfdaefa (patch) | |
| tree | 51204c710f66a91ce13b44dc400aea830f30e511 /drivers/misc/lkdtm/core.c | |
| parent | ubsan: split "bounds" checker from other options (diff) | |
| download | kernel-ae2e1aad3e48e495878d9f149e437a308bfdaefa.tar.gz kernel-ae2e1aad3e48e495878d9f149e437a308bfdaefa.zip | |
drivers/misc/lkdtm/bugs.c: add arithmetic overflow and array bounds checks
Adds LKDTM tests for arithmetic overflow (both signed and unsigned), as
well as array bounds checking.
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: Elena Petrova <[email protected]>
Cc: "Gustavo A. R. Silva" <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/misc/lkdtm/core.c')
| -rw-r--r-- | drivers/misc/lkdtm/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c index 5ce4ac8c06fc..a5e344df9166 100644 --- a/drivers/misc/lkdtm/core.c +++ b/drivers/misc/lkdtm/core.c @@ -130,6 +130,9 @@ static const struct crashtype crashtypes[] = { CRASHTYPE(HARDLOCKUP), CRASHTYPE(SPINLOCKUP), CRASHTYPE(HUNG_TASK), + CRASHTYPE(OVERFLOW_SIGNED), + CRASHTYPE(OVERFLOW_UNSIGNED), + CRASHTYPE(ARRAY_BOUNDS), CRASHTYPE(EXEC_DATA), CRASHTYPE(EXEC_STACK), CRASHTYPE(EXEC_KMALLOC), |
