• Kees Cook's avatar
    fortify: Add KUnit tests for runtime overflows · fa4a3f86
    Kees Cook authored
    With fortify overflows able to be redirected, we can use KUnit to
    exercise the overflow conditions. Add tests for every API covered by
    CONFIG_FORTIFY_SOURCE, except for memset() and memcpy(), which are
    special-cased for now.
    
    Disable warnings in the Makefile since we're explicitly testing
    known-bad string handling code patterns.
    
    Note that this makes the LKDTM FORTIFY_STR* tests obsolete, but those
    can be removed separately.
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    fa4a3f86
Makefile 15.4 KB