Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: aburgess@redhat.com, gdb-patches@sourceware.org,
	siddhesh@redhat.com, kevinb@redhat.com, simark@simark.ca,
	felix.willgerodt@intel.com, paulkoning@comcast.net
Subject: Re: [RFC] Adding a SECURITY policy for GDB
Date: Sun, 04 Feb 2024 20:56:19 +0200	[thread overview]
Message-ID: <86zfwg12jw.fsf@gnu.org> (raw)
In-Reply-To: <875xz42kic.fsf@igel.home> (message from Andreas Schwab on Sun, 04 Feb 2024 18:43:07 +0100)

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Andrew Burgess <aburgess@redhat.com>,  gdb-patches@sourceware.org,
>   siddhesh@redhat.com,  kevinb@redhat.com,  simark@simark.ca,
>   felix.willgerodt@intel.com,  paulkoning@comcast.net
> Date: Sun, 04 Feb 2024 18:43:07 +0100
> 
> On Feb 04 2024, Eli Zaretskii wrote:
> 
> > What bothered me here is that when you say "gdb ./program", GDB can do
> > two things which constitute code execution:
> >
> >   . run some startup code in the program, for example, load some
> >     shared libraries, which could trigger execution of some code in
> >     those libraries, or
> >   . process various init files, which could invoke code in
> >     Python/Guile, or call functions inside the debuggee
> >
> > The second item actually happens when you say "gdb ./emacs" in the src
> > directory of an Emacs source tree, because there's a .gdbinit file
> 
> Not by default.  It needs to be enabled by setting the auto-load
> safe-path.

That's a subtlety that, if significant, should IMO be explicitly
mentioned, because otherwise talking about "user issuing a GDB command
triggering execution (either from the GDB command line, a GDB
configuration file, or from the GDB prompt)" does not necessarily
include the above.  For example, the .gdbinit file that comes with
Emacs was not written by any particular user of GDB who happens to
debug Emacs.

  reply	other threads:[~2024-02-04 18:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 13:26 Andrew Burgess
2023-11-06 18:55 ` Kevin Buettner
2023-11-06 19:34 ` Simon Marchi
2023-11-06 20:09   ` Siddhesh Poyarekar
2023-11-06 20:15     ` Simon Marchi
2023-11-07 12:17       ` Siddhesh Poyarekar
2023-11-07 14:22         ` Simon Marchi
2023-11-09 14:35   ` Willgerodt, Felix
2023-11-16 17:19   ` Andrew Burgess
2023-11-16 17:27     ` Paul Koning
2023-11-16 21:35       ` Siddhesh Poyarekar
2023-12-08 15:05 ` Andrew Burgess
2023-12-09 10:55   ` Eli Zaretskii
2024-02-04 15:32     ` Andrew Burgess
2024-02-04 17:18       ` Eli Zaretskii
2024-02-04 17:43         ` Andreas Schwab
2024-02-04 18:56           ` Eli Zaretskii [this message]
2024-02-05 11:06         ` Andrew Burgess
2023-12-12  7:27   ` Willgerodt, Felix
2024-02-04 15:36   ` [V3] " Andrew Burgess
2024-02-18 13:55     ` Andrew Burgess
2024-03-27 11:00       ` [V4] " Andrew Burgess
2024-04-08 11:01         ` [V5] " Andrew Burgess
2024-04-09 20:30           ` Tom Tromey
2024-04-10 10:22           ` Willgerodt, Felix
2024-04-26 15:44             ` Andrew Burgess
2024-02-05 21:01   ` Tom Tromey
2024-02-09 15:59     ` Andrew Burgess
2024-02-12 16:43   ` Guinevere Larsen
2024-02-12 17:06     ` Siddhesh Poyarekar
2024-02-14 15:03       ` 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=86zfwg12jw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aburgess@redhat.com \
    --cc=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=paulkoning@comcast.net \
    --cc=schwab@linux-m68k.org \
    --cc=siddhesh@redhat.com \
    --cc=simark@simark.ca \
    /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