Home
last modified time | relevance | path

Searched hist:"447 e56023fc281c588e4977add552f4d49d78b22" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/nolibc/
H A Dnolibc-test.cdiff 447e56023fc281c588e4977add552f4d49d78b22 Wed Jul 26 01:08:13 CDT 2023 Thomas Weißschuh <linux@weissschuh.net> selftests/nolibc: avoid buffer underrun in space printing

If the test description is longer than the status alignment the
parameter 'n' to putcharn() would lead to a signed underflow that then
gets converted to a very large unsigned value.
This in turn leads out-of-bound writes in memset() crashing the
application.

The failure case of EXPECT_PTRER() used in "mmap_bad" exhibits this
exact behavior.

Fixes: 29f5540be392 ("selftests/nolibc: add EXPECT_PTREQ, EXPECT_PTRNE and EXPECT_PTRER")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>