From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Jacek Wielemborek <d33tah@gmail.com>, git@vger.kernel.org
Subject: Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3
Date: Wed, 6 Jan 2016 02:23:22 -0500 [thread overview]
Message-ID: <20160106072321.GA18477@sigill.intra.peff.net> (raw)
In-Reply-To: <20160106002333.GA16090@google.com>
On Tue, Jan 05, 2016 at 04:23:33PM -0800, Jonathan Nieder wrote:
> > Git packfiles come from two places:
> >
> > 1. Local maintenance repacks loose and already-packed objects into a
> > new packfile. We trust the local repack process to generate a valid
> > packfile (though the contents of individual objects may be
> > untrusted, of course).
>
> I think we should reconsider such trust. If one user creates a
> malicious pack, if another user uses read-only git commands to access
> the repository (after inspecting .git/config to make sure it doesn't
> contain anything scary) the result should not be arbitrary code
> execution.
>
> Producing bogus output or aborting is okay; arbitrary code execution
> less so.
I agree it is better if we can meet this standard, and I didn't mean to
discourage fixes in the area. But I do think it is worth classifying
them differently than bugs that can be triggered via the network. The
attack surface for on-disk attacks is much larger, and the number of
people affected is much smaller.
Regarding your example, I'm not sure it's the best motivating example,
as I imagine hardly anyone examines .git/config. :) A simplified one
might be that:
git fetch me@shared-server:/home/you/foo.git
is running git-upload-pack as me on packfiles created by you (on the
server). We normally expect that to be a "safe" operation (and it is if
done over git:// or similar).
-Peff
next prev parent reply other threads:[~2016-01-06 7:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 13:44 Segmentation fault found while fuzzing .pack file under 2.7.0.rc3 Jacek Wielemborek
2016-01-05 15:24 ` Jeff King
2016-01-06 0:23 ` Jonathan Nieder
2016-01-06 7:23 ` Jeff King [this message]
2016-01-06 9:27 ` Jacek Wielemborek
2016-01-06 9:46 ` Duy Nguyen
2016-01-06 12:51 ` Jacek Wielemborek
2016-01-07 19:37 ` Junio C Hamano
2016-01-07 22:54 ` Junio C Hamano
2016-01-11 21:33 ` Jeff King
2016-02-24 11:05 ` Jeff King
2016-02-24 18:48 ` Junio C Hamano
2016-02-25 14:12 ` Jeff King
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=20160106072321.GA18477@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=d33tah@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.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 NNTP newsgroup(s).