public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] fortify: Add KUnit tests for runtime overflows
@ 2023-04-07 19:27 Kees Cook
  2023-04-07 19:27 ` [PATCH v2 01/10] kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML Kees Cook
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Kees Cook @ 2023-04-07 19:27 UTC (permalink / raw)
  To: linux-hardening
  Cc: Kees Cook, Andy Shevchenko, Cezary Rojewski, Puyou Lu, Mark Brown,
	Josh Poimboeuf, Peter Zijlstra, Brendan Higgins, David Gow,
	Andrew Morton, Nathan Chancellor, Alexander Potapenko,
	Zhaoyang Huang, Randy Dunlap, Geert Uytterhoeven, Miguel Ojeda,
	Alexander Lobakin, Nick Desaulniers, Liam Howlett,
	Vlastimil Babka, Dan Williams, Rasmus Villemoes, Yury Norov,
	Jason A. Donenfeld, Sander Vanheule, Eric Biggers,
	Masami Hiramatsu (Google), Andrey Konovalov, Linus Walleij,
	Daniel Latypov, José Expósito, linux-kernel, kunit-dev

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

v2:
- fix From/SoB
- strcat: force non-const length arguments (lkp)
- fix x86 and arm fortify_panic prototypes (lkp)
- move test-skip to init function (dlatypov)
- constify p_size, q_size everywhere (miguel)
- enum-ify, string-ify, bit-ify function name passing (aleksander & andy)
v1: https://lore.kernel.org/lkml/20230405235832.never.487-kees@kernel.org/

Kees Cook (10):
  kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML
  fortify: Allow KUnit test to build without FORTIFY
  string: Add Kunit tests for strcat() family
  fortify: Use const variables for __member_size tracking
  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 +
 arch/arm/boot/compressed/misc.c              |   2 +-
 arch/x86/boot/compressed/misc.c              |   2 +-
 include/linux/fortify-string.h               | 257 +++++--
 lib/Kconfig.debug                            |   7 +-
 lib/Makefile                                 |   1 +
 lib/fortify_kunit.c                          | 731 +++++++++++++++++++
 lib/strcat_kunit.c                           | 104 +++
 lib/string_helpers.c                         |  26 +-
 tools/objtool/check.c                        |   2 +-
 tools/testing/kunit/configs/all_tests.config |   2 +
 tools/testing/kunit/configs/arch_uml.config  |   3 +
 12 files changed, 1059 insertions(+), 79 deletions(-)
 create mode 100644 lib/strcat_kunit.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-07-03 19:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-07 19:27 [PATCH v2 00/10] fortify: Add KUnit tests for runtime overflows Kees Cook
2023-04-07 19:27 ` [PATCH v2 01/10] kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML Kees Cook
2023-04-07 23:33   ` Nick Desaulniers
2023-04-07 23:42     ` Nick Desaulniers
2023-05-10 19:24       ` Kees Cook
2023-05-22 19:43         ` Nick Desaulniers
2023-05-22 20:14           ` Kees Cook
2023-05-07 15:20     ` Kees Cook
2023-04-07 19:27 ` [PATCH v2 02/10] fortify: Allow KUnit test to build without FORTIFY Kees Cook
2023-07-02 15:07   ` Geert Uytterhoeven
2023-07-03 19:47     ` Kees Cook
2023-04-07 19:27 ` [PATCH v2 03/10] string: Add Kunit tests for strcat() family Kees Cook
2023-04-07 19:27 ` [PATCH v2 04/10] fortify: Use const variables for __member_size tracking Kees Cook
2023-04-18 17:58   ` Nick Desaulniers
2023-04-07 19:27 ` [PATCH v2 05/10] fortify: Add protection for strlcat() Kees Cook
2023-04-07 19:27 ` [PATCH v2 06/10] fortify: strcat: Move definition to use fortified strlcat() Kees Cook
2023-04-18 18:09   ` Nick Desaulniers
2023-05-16 21:15     ` Kees Cook
2023-04-07 19:27 ` [PATCH v2 07/10] fortify: Split reporting and avoid passing string pointer Kees Cook
2023-04-20 15:52   ` Alexander Lobakin
2023-04-07 19:27 ` [PATCH v2 08/10] fortify: Provide KUnit counters for failure testing Kees Cook
2023-04-18 18:20   ` Nick Desaulniers
2023-04-07 19:27 ` [PATCH v2 09/10] fortify: Add KUnit tests for runtime overflows Kees Cook
2023-04-07 19:27 ` [PATCH v2 10/10] fortify: Improve buffer overflow reporting Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox