From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH] readelf: Use unsigned loop variables in handle_verneed and handle_verdef
Date: Tue, 27 Feb 2024 16:17:52 +0100 [thread overview]
Message-ID: <4bd56b66930d5369da7bd68b6c1c745ee438a5dd.camel@klomp.org> (raw)
In-Reply-To: <20240221211932.2168442-1-mark@klomp.org>
On Wed, 2024-02-21 at 22:19 +0100, Mark Wielaard wrote:
> Prevent signed underflow by changing loop variables to unsigned and
> doing count checks before decrementing. This isn't really a bug, but
> prevents UB detected by ubsan on fuzzed input. The bad (fuzzed) input
> data does get detected anyway.
>
> * src/readelf.c (handle_verneed): Use unsigned cnt, cnt2.
> (handle_verdef): Likewise.
Pushed after a quick chat with Aaron on irc.
prev parent reply other threads:[~2024-02-27 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 21:19 Mark Wielaard
2024-02-27 15:17 ` Mark Wielaard [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=4bd56b66930d5369da7bd68b6c1c745ee438a5dd.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).