Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch] New set auto-load-local-gdbinit + disable it by default
Date: Tue, 17 Jan 2012 20:22:00 -0000	[thread overview]
Message-ID: <m3y5t6hyk6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <E1Rn6Ac-0005ne-1z@fencepost.gnu.org> (Eli Zaretskii's message of	"Tue, 17 Jan 2012 05:21:38 -0500")

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Jan> Still at least the setting should go in and then one can then have
Jan> "set auto-load-local-gdbinit off" at least in ~/.gdbinit.  Anyway I
Jan> would file a FESCo (Fedora Engineering Steering Committee) ticket
Jan> for such "off" in /etc/gdbinit at least in distro and IMHO it needs
Jan> to get approved (but maybe not, it would be another fork from
Jan> upstream).

Eli> I think this is a draconian measure.  It prevents me from having a
Eli> .gdbinit file loaded automatically as appropriate for a program I'm
Eli> debugging.  Prominent examples include GDB itself and Emacs, which
Eli> both come with a .gdbinit file that makes debugging much easier.

Jan> And "gdb -x ./.gdbinit" is a pretty simple way to do what one wants to do.

Eli> "gdb -x .gdbinit" is much longer than just "gdb".

You can also put the setting into your ~/.gdbinit and get the old
behavior back.

I read through this thread and, while I agree that this change is
inconvenient, I think the inconvenience is outweighed by the security
implications.  I consider this to be similar to putting "." in PATH.
We're just lucky that it hasn't been exploited yet (or at least that we
haven't gotten the blame).

Well, I "agree" with it -- I am not happy about it by a long stretch.
I'm tempted by the idea that gdb should be insecure by default and we
should require "-safe"... but on balance this seems irresponsible to me,
as I think that tools should generally be secure by default.

FWIW, I think this patch doesn't go far enough :-(
Some other topics for consideration; perhaps the new option could cover
all such cases.

* Auto-loading of Python code from the filesystem.
  Perhaps we could have a set of trusted directories; but I wonder if
  there are issues with sysroots starting with "remote:".

* Auto-loading of Python code from objfiles.
  Even more dangerous.

* The JIT interface.
  I'm not sure whether this can be exploited or not.

FWIW, I will probably set the new parameter in my own .gdbinit and use
"-safe" in those rare instances that I do something other than debug
programs that I built myself.

Tom


  parent reply	other threads:[~2012-01-17 20:19 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 10:16 Jan Kratochvil
2012-01-17 12:34 ` Eli Zaretskii
2012-01-17 13:42   ` Joel Brobecker
2012-01-17 14:49     ` [patch 7.4] Deprecate local .gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-17 16:22       ` Doug Evans
2012-01-17 20:22   ` Tom Tromey [this message]
2012-01-17 16:15 ` [patch] New set auto-load-local-gdbinit + disable it by default Doug Evans
2012-01-17 16:34   ` Jan Kratochvil
2012-01-17 16:48     ` Doug Evans
2012-01-17 17:27       ` Jan Kratochvil
2012-01-17 17:33         ` Doug Evans
2012-01-17 17:55           ` Jan Kratochvil
2012-01-17 18:29             ` Eli Zaretskii
2012-01-17 18:35               ` Jan Kratochvil
2012-01-17 19:54                 ` Tom Tromey
2012-01-17 18:31             ` Doug Evans
2012-01-17 18:44               ` Jan Kratochvil
2012-01-17 19:12                 ` Doug Evans
2012-01-17 19:20                   ` Jan Kratochvil
2012-01-17 19:55               ` Tom Tromey
2012-01-17 20:24                 ` Pedro Alves
2012-01-17 20:26                   ` Tom Tromey
2012-01-17 20:35                   ` Jan Kratochvil
2012-01-17 20:56                     ` Pedro Alves
2012-01-17 19:30           ` Matt Rice
2012-01-17 19:37             ` Jan Kratochvil
2012-01-17 20:26             ` Tom Tromey
2012-01-17 18:00     ` Eli Zaretskii
2012-01-17 18:28       ` Jan Kratochvil
2012-01-17 18:43         ` Eli Zaretskii
2012-01-17 19:02           ` Jan Kratochvil
2012-01-17 20:29         ` Tom Tromey
2012-01-17 20:49           ` Jan Kratochvil
2012-01-17 20:54             ` Doug Evans
2012-01-17 21:10             ` Tom Tromey
2012-01-17 21:13           ` Eli Zaretskii
2012-01-17 21:14             ` Tom Tromey
2012-01-18  4:26               ` Joel Brobecker
2012-01-18 19:38                 ` Jan Kratochvil
2012-01-18 20:01                   ` Doug Evans
2012-01-19  6:30                   ` Joel Brobecker
2012-01-19 12:57                     ` [commit] rm gdb/testsuite/.gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-19 21:07                   ` [patch] New set auto-load-local-gdbinit + disable it by default Tom Tromey
2012-01-19 21:47                     ` Jan Kratochvil
2012-01-19 21:53                       ` Doug Evans
2012-01-20  4:11                         ` Jan Kratochvil
2012-01-19 21:06                 ` Tom Tromey
2012-01-17 22:16             ` Doug Evans
2012-01-18  3:05               ` Tom Tromey
2012-01-17 16:26 ` Matt Rice
2012-01-17 16:57   ` Doug Evans
2012-01-17 20:09 ` Tom Tromey
2012-01-24  0:33 ` Stan Shebs
2012-01-24 15:54   ` Jan Kratochvil

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=m3y5t6hyk6.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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