]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fortify: Fix dropped strcpy() compile-time write overflow check
authorKees Cook <keescook@chromium.org>
Mon, 2 Aug 2021 17:25:01 +0000 (10:25 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 26 Aug 2021 02:48:55 +0000 (19:48 -0700)
commitee3f49bc6e4e43a5af158ab2773825bb8afa6e1f
tree50eb13dca0314c3d7b7e52bde12c5d2d0216c2d9
parent6bea7154887de1e7ddd3673a03505de911dfb6c4
fortify: Fix dropped strcpy() compile-time write overflow check

The implementation for intra-object overflow in str*-family functions
accidentally dropped compile-time write overflow checking in strcpy(),
leaving it entirely to run-time. Add back the intended check.

Fixes: 6a39e62abbaf ("lib: string.h: detect intra-object overflow in fortified string functions")
Cc: Daniel Axtens <dja@axtens.net>
Cc: Francis Laniel <laniel_francis@privacyrequired.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
include/linux/fortify-string.h