From cf2f06f7152d5e38a87aa2e9b8b452714789f6ba Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 23 Mar 2026 19:07:30 -0700 Subject: lkdtm/fortify: Drop unneeded FORTIFY_STR_OBJECT test The str* family of fortified functions all use member-sized limits for a while now, so the FORTIFY_STR_OBJECT test is redundant to FORTIFY_STR_MEMBER. While here, replace the strncpy() use with strscpy(), as strncpy() is being removed. Link: https://patch.msgid.link/20260324020726.work.624-kees@kernel.org Signed-off-by: Kees Cook --- tools/testing/selftests/lkdtm/tests.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'tools') diff --git a/tools/testing/selftests/lkdtm/tests.txt b/tools/testing/selftests/lkdtm/tests.txt index e62b85b591be..3245032db34d 100644 --- a/tools/testing/selftests/lkdtm/tests.txt +++ b/tools/testing/selftests/lkdtm/tests.txt @@ -82,7 +82,6 @@ STACKLEAK_ERASING OK: the rest of the thread stack is properly erased CFI_FORWARD_PROTO CFI_BACKWARD call trace:|ok: control flow unchanged FORTIFY_STRSCPY detected buffer overflow -FORTIFY_STR_OBJECT detected buffer overflow FORTIFY_STR_MEMBER detected buffer overflow FORTIFY_MEM_OBJECT detected buffer overflow FORTIFY_MEM_MEMBER detected field-spanning write -- cgit v1.2.3