]> git.baikalelectronics.ru Git - kernel.git/commit
lib/test_printf.c: check for out-of-bound writes
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Sat, 16 Jan 2016 00:58:53 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2016 19:17:28 +0000 (11:17 -0800)
commit61bba68c3cf28106974d7c6b8c1008651b007421
tree3a755146ef906973c041b7c3db2697852e4749f3
parent751217af3afdf63b6c96f989d25a7337c32f4ca8
lib/test_printf.c: check for out-of-bound writes

Add a few padding bytes on either side of the test buffer, and check
that these (and the part of the buffer not used) are untouched by
vsnprintf.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Joe Perches <joe@perches.com>
Cc: Maurizio Lombardi <mlombard@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test_printf.c