From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Shuah Khan <shuah@kernel.org>, Zhangjin Wu <falcon@tinylab.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/nolibc: avoid buffer underrun in space printing
Date: Sat, 29 Jul 2023 09:29:33 +0200 [thread overview]
Message-ID: <20230729072933.GF956@1wt.eu> (raw)
In-Reply-To: <20230726-nolibc-result-width-v1-1-d1d2dc21844e@weissschuh.net>
On Wed, Jul 26, 2023 at 08:08:13AM +0200, Thomas Weißschuh wrote:
> 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: 8a27526f49f9 ("selftests/nolibc: add EXPECT_PTREQ, EXPECT_PTRNE and EXPECT_PTRER")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Applied, thank you Thomas!
Willy
prev parent reply other threads:[~2023-07-29 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 6:08 [PATCH] selftests/nolibc: avoid buffer underrun in space printing Thomas Weißschuh
2023-07-29 7:29 ` Willy Tarreau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230729072933.GF956@1wt.eu \
--to=w@1wt.eu \
--cc=falcon@tinylab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox