summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/Makefile
diff options
context:
space:
mode:
authorFrancis Laniel <laniel_francis@privacyrequired.com>2020-12-16 05:43:54 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 07:46:16 +0100
commitfebebaf366868a4204deb3955ef5dda17f676fc1 (patch)
treeecad89f7e968a84ea586af705e4404890bbb2a8b /drivers/misc/lkdtm/Makefile
parentstring.h: add FORTIFY coverage for strscpy() (diff)
downloadlinux-febebaf366868a4204deb3955ef5dda17f676fc1.tar.xz
linux-febebaf366868a4204deb3955ef5dda17f676fc1.zip
drivers/misc/lkdtm: add new file in LKDTM to test fortified strscpy
This new test ensures that fortified strscpy has the same behavior than vanilla strscpy (e.g. returning -E2BIG when src content is truncated). Finally, it generates a crash at runtime because there is a write overflow in destination string. Link: https://lkml.kernel.org/r/20201122162451.27551-5-laniel_francis@privacyrequired.com Signed-off-by: Francis Laniel <laniel_francis@privacyrequired.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Daniel Axtens <dja@axtens.net> Cc: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/lkdtm/Makefile')
-rw-r--r--drivers/misc/lkdtm/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile
index 1ef7888a12b5..7727bfd32be9 100644
--- a/drivers/misc/lkdtm/Makefile
+++ b/drivers/misc/lkdtm/Makefile
@@ -10,6 +10,7 @@ lkdtm-$(CONFIG_LKDTM) += rodata_objcopy.o
lkdtm-$(CONFIG_LKDTM) += usercopy.o
lkdtm-$(CONFIG_LKDTM) += stackleak.o
lkdtm-$(CONFIG_LKDTM) += cfi.o
+lkdtm-$(CONFIG_LKDTM) += fortify.o
KASAN_SANITIZE_rodata.o := n
KASAN_SANITIZE_stackleak.o := n