Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <sipoyare@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/5] gdb: extend SECURITY.txt to highlight additional remote debugging risks
Date: Fri, 16 Oct 2026 10:27:30 -0400	[thread overview]
Message-ID: <6248c8e1-8402-4eb8-bb3b-c6a796eb1f67@redhat.com> (raw)
In-Reply-To: <87qzhp9100.fsf@redhat.com>

On 10/16/26 10:24 AM, Andrew Burgess wrote:
> commit 2879d94ad12bae33908f1fc967c79f59ee97919a
> Author: Andrew Burgess <aburgess@redhat.com>
> Date:   Mon Oct 5 14:14:05 2026 +0100
> 
>      gdb: extend SECURITY.txt to highlight additional remote debugging risks
>      
>      I had cause to re-read the SECURITY.txt document recently, and I felt
>      that it wasn't really clear on one aspect of using GDB with gdbserver
>      (or any remote target).
>      
>      I felt that the text wasn't explicit enough about how a remote target
>      can download executables and libraries to GDB, and how GDB can then
>      parse these files.  When we consider the sort of bugs we see,
>      especially in BFD and the DWARF parser, when it comes to badly
>      formatted files, I thought it was worth calling this out.
> 
> diff --git a/gdb/SECURITY.txt b/gdb/SECURITY.txt
> index f4ddebe3f03..64d68f88b84 100644
> --- a/gdb/SECURITY.txt
> +++ b/gdb/SECURITY.txt
> @@ -210,6 +210,28 @@ Security Realities Of The GDB Project
>     user to protect this connection, for example, by only starting
>     gdbserver within a secure network.
>   
> +  Additionally, when GDB connects to a remote target, it will, by
> +  default, automatically download the executable and shared libraries
> +  from the remote system and parse them locally, without prompting the
> +  user.  This means that the risks described above relating to parsing
> +  malformed executables also apply when performing remote debugging.
> +
> +  If the remote target is untrusted, or the connection to the remote
> +  target is untrusted, malicious or malformed binaries could be served
> +  to GDB, resulting in any of the issues described above.  Any bugs in
> +  GDB triggered by such files are evaluated against the definitions in
> +  this document independently of how the files were obtained.
> +
> +  Any bug related to remote debugging, whether the remote connection
> +  or target is trusted or not, is a security bug if the bug meets the
> +  other definitions in this document.  If an untrusted remote target,
> +  or use of an untrusted connection makes use of a documented GDB
> +  behaviour, then this is not a security bug in GDB.

That closes the gap, thanks.

Sid

> +
> +  Users should apply the same precautions when performing remote
> +  debugging as when analysing an untrusted binary locally, including
> +  running GDB in a secure, sandboxed environment.
> +
>   Reporting Non-Security Bugs
>   ---------------------------
>   


  reply	other threads:[~2026-10-16 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 13:49 [PATCH 0/5] SECURITY.txt changes Andrew Burgess
2026-10-12 13:49 ` [PATCH 1/5] gdb: fix minor grammar error in SECURITY.txt Andrew Burgess
2026-10-14 15:02   ` Tom Tromey
2026-10-12 13:49 ` [PATCH 2/5] gdb: extend SECURITY.txt to highlight additional remote debugging risks Andrew Burgess
2026-10-13 15:22   ` Siddhesh Poyarekar
2026-10-14 15:08     ` Tom Tromey
2026-10-14 16:10       ` Siddhesh Poyarekar
2026-10-16 14:24         ` Andrew Burgess
2026-10-16 14:27           ` Siddhesh Poyarekar [this message]
2026-10-12 13:49 ` [PATCH 3/5] gdb: extend SECURITY.txt discussion of DWARF/BFD parser bugs Andrew Burgess
2026-10-13 15:30   ` Siddhesh Poyarekar
2026-10-14 15:12     ` Tom Tromey
2026-10-14 16:16       ` Siddhesh Poyarekar
2026-10-14 17:28         ` Carlos O'Donell
2026-10-12 13:49 ` [PATCH 4/5] gdb: in SECURITY.txt, add notes on reporting exec and debug bugs Andrew Burgess
2026-10-12 13:49 ` [PATCH 5/5] gdb: improve SECURITY.txt relating to embedded language bugs Andrew Burgess
2026-10-14 15:44 ` [PATCH 0/5] SECURITY.txt changes Tom Tromey

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=6248c8e1-8402-4eb8-bb3b-c6a796eb1f67@redhat.com \
    --to=sipoyare@redhat.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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