public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb: fix use-after-free in check_longjmp_breakpoint_for_call_dummy
Date: Tue, 9 May 2023 13:48:52 -0400	[thread overview]
Message-ID: <85aa7f8d-a189-6c1a-2d46-f8ed6f9fbc9e@simark.ca> (raw)
In-Reply-To: <87cz397fgt.fsf@tromey.com>

On 5/9/23 10:21, Tom Tromey wrote:
>>>>>> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
>> Commit 7a8de0c33019 ("Remove ALL_BREAKPOINTS_SAFE") introduced a
>> use-after-free in the breakpoints iterations (see below for full ASan
>> report).  This makes gdb.base/stale-infcall.exp fail when GDB is build
>> with ASan.
> 
> Sorry about that.
> 
>> The new code kept the B_TMP variable, but it's not useful in that
>> context.  We can't go change the next breakpoint as saved by the safe
>> iterator, like we did before.  I suggest fixing that by saving the
>> breakpoints to delete in a map and deleting them all at the end.
> 
> Looks good.
> 
> Approved-By: Tom Tromey <tom@tromey.com>
> 
> Tom

Thanks, pushed.

Simon

  reply	other threads:[~2023-05-09 17:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 14:59 Simon Marchi
2023-05-09 14:21 ` Tom Tromey
2023-05-09 17:48   ` Simon Marchi [this message]
2023-05-10  9:12 ` Andrew Burgess
2023-05-10 11:50   ` Simon Marchi
2023-05-12 10:19     ` Andrew Burgess

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=85aa7f8d-a189-6c1a-2d46-f8ed6f9fbc9e@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tom@tromey.com \
    /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).