git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Torres <santiago@nyu.edu>
To: Stefan Beller <sbeller@google.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: [RFC] Malicously tampering git metadata?
Date: Thu, 14 Jan 2016 12:16:39 -0500	[thread overview]
Message-ID: <20160114171639.GB25541@LykOS> (raw)
In-Reply-To: <CAGZ79kadpy9N0qEpxK-USVxCmNfYJm1g5xr8ZiFxf7sOVKZnEw@mail.gmail.com>

Hello Stefan, thanks for your feedback again. 

> This is what push certs ought to solve already?

Yes, they aim to solve the same issue. Unfortunately, push certificates
don't solve all posible scenarios of metadata manipulation (e.g., a
malicious server changing branch pointers to trick a user into merging
unwanted changes).

> AFAIU the main issue with untrustworthy servers is holding back the latest push.
> As Ted said, usually there is problem in the code and then the fix is pushed,
> but the malicious server would not advertise the update, but deliver the old
> unfixed version.
> 
> This attack cannot be mitigated by having either a side channel (email
> announcements)
> or time outs (state is only good if push cert is newer than <amount of
> time>, but this may
> require empty pushes)
> 

I'm sorry, did you mean to say "can"? 

Yes, this is a possible solution to this issue. The solution I'm
proposing here wouldn't require a side channel though. As long as users'
keys are not compromised, the BSL could either expire (raise an alarm),
or force an irreconcileable fork attack --- the user who submited the
changes won't be able to push until this change makes it through.

> 
> >
> > Furthermore, upon fetching, users with write access also push an entry
> > indicating that they fetched the BSL. This avoids cases in which a malicious
> > attacker keeps older versions of the BSL and withhold changes to other users.
> 
> This would make it a "be malicious to all or none" thing? So the
> attacker cannot attack
> a single target IIUC.

Yes, this is true. The ides is that any attack to a single target is
easy to identify.

> 
> I have a bad feeling about repository modifications upon fetching as
> software distribution is a highly asymmetric workflow (number of
> fetches is many orders of magnitudes larger than pushes), which may
> not scale well? 

Yes, we were worried about the same ourselves. The upside is that, push
and fetch entries in our scheme are also orders of magnitude smaller;
fetch entries do not need to be signed and they can be as little as four
bytes (they might be gc-able also). 


> (How would you serialize parallel fetches into the BSL?)

Yes, this would imply that locking needs to be performed on the server
side. It is important to note that fetch entries are only relevant for
users to have write access (as only they are beneffited by them). For
read-only fetches, like an automated build, this feature could be
disabled.

> 
> Thanks,
> Stefan

Thanks again!
-Santiago.

  reply	other threads:[~2016-01-14 17:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16  3:26 [RFC] Malicously tampering git metadata? Santiago Torres
2015-12-16  7:20 ` Stefan Beller
2015-12-18  1:06   ` Santiago Torres
2015-12-18  3:55     ` Jeff King
2015-12-18  4:02 ` Jeff King
2015-12-18 23:10 ` Theodore Ts'o
2015-12-19 17:30   ` Santiago Torres
2015-12-20  1:28     ` Theodore Ts'o
2016-01-12 18:21       ` Santiago Torres
2016-01-12 18:39         ` Stefan Beller
2016-01-14 17:16           ` Santiago Torres [this message]
2016-01-14 17:21             ` Stefan Beller
2016-01-22 18:00               ` Santiago Torres
2016-01-22 18:51                 ` Stefan Beller

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=20160114171639.GB25541@LykOS \
    --to=santiago@nyu.edu \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.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).