From: Jeff King <peff@peff.net>
To: Bill Zaumen <bill.zaumen+git@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, pclouds@gmail.com,
spearce@spearce.org, torvalds@linux-foundation.org
Subject: Re: [PATCH] Implement fast hash-collision detection
Date: Fri, 2 Dec 2011 12:00:40 -0500 [thread overview]
Message-ID: <20111202170040.GA23447@sigill.intra.peff.net> (raw)
In-Reply-To: <1322794744.1673.494.camel@yos>
On Thu, Dec 01, 2011 at 06:59:04PM -0800, Bill Zaumen wrote:
> > What about the server being more clever about hiding the replacement
> > object? E.g., instead of just breaking into kernel.org and inserting a
> > replacement object, the attacker runs a malicious git-daemon that
> > returns the bogus object to cloners, but the real object to fetchers.
>
> That's really a server-security issue, not a git one. Perhaps
> repositories should be configured so that all the executables are on
> read-only partitions. It's an important question in general of
> course, but it is probably useful to distinguish attacks that put
> bad data on a server from ones that install new software.
I don't agree here. You have to assume that the attacker will ignore
attacks you have blocked, but continue with ones you haven't (just to
counter your example, why not replace the running git-daemon
in-memory?).
You can target the narrow window of attacks that compromise the on-disk
repository without being able to execute arbitrary code. But I don't see
a point. After the kernel.org hack, yes, people are interested in
hardening kernel.org. But they are much more interested in cryptographic
sources of authority that let us not have to trust kernel.org at all.
Having some weird half-way trust just complicates things.
> > But we can already do that. Assume you have an existing repo "foo". To
> > verify the copy at git://example.com/foo.git, do a fresh clone to
> > "bar", and then compare the objects in "foo" to "bar", either byte-wise
> > or by digest.
>
> Of course, but that is an expensive operation - in the case of Git
> transferring some 50 MBytes of data per repository. A command to
> fetch the SHA-1 ID and a CRC or message digest for each object would
> not only run faster, but should put a much lower load on the server.
Yes, it is more expensive. But again, my threat model is that the server
is not trusted to serve data accurately or consistently. So you can't
come to the server and say "Hey, I'm doing a security verification. Can
you send me the CRCs?" You _have_ to present yourself as one of the
victims to be infected by the bad object, or a smart attacker will send
you the unmodified data.
> Getting back to the birthday attack question (this is an area where
> your comments were very useful for me), there's a case I didn't
> consider.
> [elaborate birthday attack scenario]
>From my quick reading of your scenario, yes, that is a possible attack.
To me, though, it just highlights the need for either a non-colliding
algorithm, or for better trust verification about the authors of objects
(i.e., cryptographically strong trust).
-Peff
next prev parent reply other threads:[~2011-12-02 17:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1322546563.1719.22.camel@yos>
2011-11-29 9:07 ` [PATCH] Implement fast hash-collision detection Jeff King
2011-11-29 10:24 ` Ævar Arnfjörð Bjarmason
2011-11-29 10:29 ` Jeff King
2011-11-29 13:17 ` Nguyen Thai Ngoc Duy
2011-11-29 15:23 ` Shawn Pearce
2011-11-29 14:04 ` Nguyen Thai Ngoc Duy
2011-11-29 20:59 ` Jeff King
2011-11-30 13:35 ` Nguyen Thai Ngoc Duy
2011-11-30 18:05 ` Junio C Hamano
2011-12-01 4:43 ` Nguyen Thai Ngoc Duy
2011-11-30 19:00 ` Bill Zaumen
2011-11-29 21:56 ` Bill Zaumen
2011-11-30 6:25 ` Jeff King
2011-12-01 0:41 ` Bill Zaumen
2011-12-01 5:26 ` Jeff King
2011-12-02 2:59 ` Bill Zaumen
2011-12-02 17:00 ` Jeff King [this message]
2011-11-29 17:08 ` Shawn Pearce
2011-11-29 22:05 ` Jeff King
2011-11-30 4:01 ` Bill Zaumen
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=20111202170040.GA23447@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bill.zaumen+git@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=spearce@spearce.org \
--cc=torvalds@linux-foundation.org \
/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).