Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Adding a SECURITY policy for GDB
@ 2023-11-06 13:26 Andrew Burgess
  2023-11-06 18:55 ` Kevin Buettner
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Andrew Burgess @ 2023-11-06 13:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: Siddhesh Poyarekar


Hello!

I'd like to add a SECURITY policy document to the GDB project.

The purpose of this policy would be to define what we, the upstream GDB
project, consider to be a security issue (within GDB) in contrast to
what is just a non-security bug within GDB.

At Red Hat we see a consistent stream of CVEs filled against GDB.  When
we discuss these issues internally, we have, at least recently, been of
the opinion that these issues are not really security bugs, but are
just standard, non-security bugs.

Now, that doesn't mean that a non-security bug shouldn't be fixed.  But
having issues labelled as CVE often leads to pressure for an immediate
resolution, and often the effort spent fixing a crash within e.g. the
DWARF reader triggered by an invalid ELF, would be better spent fixing
other bugs in GDB.

So, the purpose of this email is to start a discussion about how
the upstream GDB project feels about security vs non-security issues.
If we can reach agreement, and establish an upstream GDB SECURITY
policy, then this might allow downstream distributors of GDB to push
back against CVEs based on the upstream policy document.

It is worth noting that binutils has already adopted a SECURITY policy,
which can be found in binutils-gdb/binutils/SECURITY.txt.

There is also binutils-gdb/SECURITY.txt, which does refer readers to
binutils-gdb/gdb/SECURITY.txt, even though this file does not yet exist!

Below is my straw-man proposal for a SECURITY.txt document.  Given the
position I've outlined above, this document does try to make it clear
that pretty much no bugs in GDB should be considered a security issue.

I'd be interested to hear:

  * Do people feel I'm being too restrictive in what I consider a
    security issue?  Are there any additional classes of bug that you
    would see as a security issue within GDB?

  * I've tried to highlight areas of GDB that might pose a risk if run
    in a non-secure setting, e.g. GDB run the inferior, so using GDB to
    debug unknown inferiors can allow arbitrary code execution, or that
    gdbserver on an open network would allow access to the machine
    running gdbserver.  Are there any other areas of GDB for which we
    should list as being potentially dangerous if not run in a secure
    (sandboxed) environment?

Thanks,
Andrew

---

GDB Security Process
====================

What is a GDB security bug?
===========================

  A security bug is one that threatens the security of a system or
  network, or might compromise the security of data stored on it.  The
  primary use case of GNU GDB is to diagnose issues in programs.
  These programs may be local, i.e. on the system on which GDB runs or
  remote, on a different system.

  In the context of local debugging, any bugs in GDB that result in
  crossing of a privilege boundary are considered security bugs.  Some
  examples of crossing a privilege boundary include; being able to
  execute code as an arbitrarily different user, or accessing resources
  (e.g. files, sockets, etc) for which the original user would not
  normally have access.

  In the context of remote debugging, there are two components of
  relevance; GDB running on the local machine, and a remote target
  running as a potentially different user, with different permissions,
  on a remote machine.

  The GNU GDB project provides one remote target, gdbserver.  As with
  GDB, any bugs in gdbserver that result in crossing of a privilege
  boundary are considered security bugs.

  Other projects also implement remote targets to which GDB can
  connect.  Any bugs in these remote targets are out of scope for the
  GNU GDB project, and should be reported to the relevant project.

  The connection between GDB and a remote target is not protected by
  either authentication, or encryption.  Connecting to a remote target
  allows for arbitrary code execution on the remote system with the
  same privileges as the remote user, and any resource that the remote
  user can access can be read by GDB, and downloaded to the local
  machine on which GDB is running.  As such users need to take
  independent measures to secure the connection between GDB and the
  remote target.

  While GDB is intended to be robust against untrusted binaries, it is
  not responsible for arbitrary code execution on a system.  As a
  result, any bugs exposed by untrusted binaries will be accepted and
  treated with appropriate urgency, but will not be considered
  security issues.  This applies to local as well as remote debugging;
  any bugs in gdbserver, exposed by untrusted binaries will be
  accepted and treated with appropriate urgency, but will not be
  considered security issues.

  GDB assumes that the remote target is trusted.  While GDB is
  intended to be robust against incorrectly behaving remote targets, a
  malicious remote target could trigger bugs within GDB.  Any bugs
  exposed by connecting to an untrusted remote target will be accepted
  and treated with appropriate urgency, but will not be considered
  security issues unless the bug triggers a privilege boundary
  crossing.

Reporting private security bugs
===============================

  NOTE: All bugs reported in the GDB Bugzilla are public.

  In order to report a private security bug that is not immediately
  public, please contact one of the downstream distributions with
  security teams.  The following teams have volunteered to handle
  such bugs:

     Red Hat: secalert@redhat.com
     SUSE:    security@suse.de

  Please report the bug to just one of these teams.  It will be shared
  with other teams as necessary.
  The team contacted will take care of details such as vulnerability
  rating and CVE assignment (http://cve.mitre.org/about/).  It is likely
  that the team will ask to file a public bug because the issue is
  sufficiently minor and does not warrant an embargo.  An embargo is not
  a requirement for being credited with the discovery of a security
  vulnerability.

Reporting public security bugs
==============================

  It is expected that critical security bugs will be rare, and that most
  security bugs can be reported in GDB Bugzilla system, thus making
  them public immediately.  The system can be found here:

     https://sourceware.org/bugzilla/


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-04-26 15:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06 13:26 [RFC] Adding a SECURITY policy for GDB 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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox