Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

From: Jeff King <hidden>
Date: 2016-06-15 23:07:38

On Tue, Jan 05, 2016 at 04:23:33PM -0800, Jonathan Nieder wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help