summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFrancis Laniel <laniel_francis@privacyrequired.com>2020-12-15 20:43:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 22:46:16 -0800
commit33e56a59e64dfb68778e5da0be13f0c47dc5d445 (patch)
tree7dad2afbc8c1984d3434b3bfb23f8c3cb5addc3f /drivers
parentd96938daae2a2ae20e5d3d38ddb85d8afdaee628 (diff)
string.h: add FORTIFY coverage for strscpy()
The fortified version of strscpy ensures the following before vanilla strscpy is called: 1. There is no read overflow because we either size is smaller than src length or we shrink size to src length by calling fortified strnlen. 2. There is no write overflow because we either failed during compilation or at runtime by checking that size is smaller than dest size. Link: https://lkml.kernel.org/r/20201122162451.27551-4-laniel_francis@privacyrequired.com Signed-off-by: Francis Laniel <laniel_francis@privacyrequired.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Daniel Axtens <dja@axtens.net> Cc: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions