public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org,  Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH] gdb: fix buffer overflow in DWARF reader
Date: Thu, 14 Sep 2023 10:03:28 -0600	[thread overview]
Message-ID: <87msxohhdb.fsf@tromey.com> (raw)
In-Reply-To: <281fdfc6ef3997cfab17d2379b51b208c0e00070.1694706424.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 14 Sep 2023 16:48:09 +0100")

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> In this commit:
Andrew>   commit 48ac197b0c209ccf1f2de9704eb6cdf7c5c73a8e
Andrew>   Date:   Fri Nov 19 10:12:44 2021 -0700

Andrew>       Handle multiple addresses in call_site_target

Andrew> a buffer overflow bug was introduced when the following code was
Andrew> added:

Sorry about that.

Andrew> I'm not sure how to create a test for this problem, this issue cropped
Andrew> up when debugging a particular i686 built binary, which just happened
Andrew> to trigger a glibc assertion (likely due to random memory corruption),
Andrew> debugging the same binary built for x86-64 appeared to work just fine.

The best thing would be if we had valgrind annotations for obstack.
Then valgrind or perhaps ASAN would catch this kind of bug.

Approved-By: Tom Tromey <tom@tromey.com>

Tom

      reply	other threads:[~2023-09-14 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 15:48 Andrew Burgess
2023-09-14 16:03 ` Tom Tromey [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=87msxohhdb.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@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).