lkml.org 
[lkml]   [2023]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/9] fortify: Add KUnit tests for runtime overflows
Date
Hi,

This series adds KUnit tests for the CONFIG_FORTIFY_SOURCE behavior of the
standard C string functions, and for the strcat() family of functions,
as those were updated during refactoring. Finally, fortification error
messages are improved to give more context for the failure condition.

-Kees

Kees Cook (9):
kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML
fortify: Allow KUnit test to build without FORTIFY
string: Add Kunit tests for strcat() family
fortify: Add protection for strlcat()
fortify: strcat: Move definition to use fortified strlcat()
fortify: Split reporting and avoid passing string pointer
fortify: Provide KUnit counters for failure testing
fortify: Add KUnit tests for runtime overflows
fortify: Improve buffer overflow reporting

MAINTAINERS | 1 +
include/linux/fortify-string.h | 204 +++--
lib/Kconfig.debug | 7 +-
lib/Makefile | 1 +
lib/fortify_kunit.c | 795 +++++++++++++++++++
lib/strcat_kunit.c | 100 +++
lib/string_helpers.c | 74 +-
tools/objtool/check.c | 2 +-
tools/testing/kunit/configs/all_tests.config | 2 +
tools/testing/kunit/configs/arch_uml.config | 3 +
10 files changed, 1133 insertions(+), 56 deletions(-)
create mode 100644 lib/strcat_kunit.c

--
2.34.1

\
 
 \ /
  Last update: 2023-04-06 02:03    [W:1.347 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site