GNU bug report logs

#22883 Trustable "guix pull"

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #28 received at 22883@debbugs.gnu.org (full text, mbox, reply):

Received: (at 22883) by debbugs.gnu.org; 30 Apr 2016 06:56:47 +0000
From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 02:56:47 2016
Received: from localhost ([127.0.0.1]:56355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1awOpa-0002tl-MT
	for submit@debbugs.gnu.org; Sat, 30 Apr 2016 02:56:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48281)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mtg@gnu.org>) id 1awMli-0008Af-At
 for 22883@debbugs.gnu.org; Sat, 30 Apr 2016 00:44:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mtg@gnu.org>) id 1awMlT-00031q-71
 for 22883@debbugs.gnu.org; Sat, 30 Apr 2016 00:44:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47614)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <mtg@gnu.org>)
 id 1awMlK-0002zC-Le; Sat, 30 Apr 2016 00:44:14 -0400
Received: from localhost ([::1]:53428 helo=mikegerwitz-pc.gerwitz.local)
 by fencepost.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <mtg@gnu.org>)
 id 1awMlD-0000Ov-Ie; Sat, 30 Apr 2016 00:44:07 -0400
From: Mike Gerwitz <mtg@gnu.org>
To: Leo Famulari <leo@famulari.name>
Subject: Re: bug#22883: Trustable "guix pull"
In-Reply-To: <20160426001359.GA23088@jasmine> (Leo Famulari's message of "Mon, 
 25 Apr 2016 20:13:59 -0400")
Date: Sat, 30 Apr 2016 00:43:55 -0400
Message-ID: <874majg0z8.fsf@gnu.org>
References: <87io14sqoa.fsf@dustycloud.org> <87h9ep8gxk.fsf@gnu.org>
 <20160426001359.GA23088@jasmine>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 22883
X-Mailman-Approved-At: Sat, 30 Apr 2016 02:56:45 -0400
Cc: Christopher Allan Webber <cwebber@dustycloud.org>, 22883@debbugs.gnu.org,
 Ludovic Courtès <ludo@gnu.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -6.0 (------)
[Message part 1 (text/plain, inline)]
Hey, guys.  Chris mentioned this thread to me.  I'm happy to see the
discussion!

Chris: unfortunately, my `mml-secure-openpgp-encrypt-to-self` flag
somehow got unset when I sent you my reply, so I can't read my own
message.  But I'll rewrite some of it here.

On Mon, Apr 25, 2016 at 20:13:59 -0400, Leo Famulari wrote:
>> Note that we’ll be signing patches we push on behalf of contributors who
>> do not have commit access (reviewer’s responsibility).
>> 
>> Also, rebasing, amending, and cherry-picking code signed by someone else
>> would lose the original signature, which isn’t great and should be
>> avoided, if possible.
>
> I think it's common to make minor edits when committing on behalf of
> others. For example, the committer might clean up a commit message or
> standardize indentation.
>
> How should we handle this?

You don't.

One of the core purposes of digital signatures is to ensure integrity of
the signed data: if I submit a patch, I don't want someone else
modifying it and saying it was my own, or saying it was modified without
supplying a diff; that'd be a misrepresentation; a horror story
almost. ;)

The question is for what purpose you're signing commits.  Chris
mentioned trust, but that can come in a few different forms.  Signatures
ensure:

  - Authentication: whether the commit came from a trusted source;
  - Integrity: assurance that the commit has not been modified; and
  - Non-repudiation of origin: the signer cannot deny signing it.

If you only care about authentication, then it doesn't matter if the
signature is retained---it only matters that the person who eventually
signs off on the commit is trusted.  In that case, just sign it.

If it's integrity, then make another commit that changes the
original.  I recommend this regardless, for the reason I stated above;
just branch, apply their commits, your change, and merge.

For non-repudiation assurances, you'll need to keep the original
signature as well.  This might be useful, say, in the case of issues
with copyright assignments---maybe an employer holds copyright on the
code and the employee claims he/she isn't the person that actually
submitted it.

All of this subject to the usual crypo-caveats (no compromised private
key, yadda yadda).

Now, what is being signed isn't actually the code---it's the contents of
the commit object, which includes a SHA-1 hash of the tree, parent
commit(s), author, committer, timestamp, and commit message:

--8<---------------cut here---------------start------------->8---
$ git cat-file -p 7062845
tree 7d21b900c0773d7fdc898aecff11053a910ac18d
parent 2b56dc019a049b2f68ce078b243fc313fbaeacf3
author Ludovic Courtès <ludo@gnu.org> 1461943404 +0200
committer Ludovic Courtès <ludo@gnu.org> 1461945944 +0200
gpgsig -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
[...]
 -----END PGP SIGNATURE-----

nls: Add Simplified Chinese translation.

[...]
--8<---------------cut here---------------end--------------->8---

My point with this[*] is that the GPG signature you receive isn't
meaningful in the case of a rebase---if it signed blobs or a diff, maybe
it would be.  But since rebasing will eventually cause the GPG-signed
commit to be GC'd (unless there's a ref to it), you can't modify the
commit and just reference the old diff with the original signature.

More details in a discussion with Whonix here:

  https://web.archive.org/web/20150619232904/https://www.whonix.org/forum/index.php?topic=538.msg4278#msg4278

So if you do want to clean up or squash GPG-signed changes from
contributors, or do other rebasing, then I'd either push back and tell
them to do it, or maybe have them send GPG-signed _patches_ to a public
mailing list where it can be permanently archived; then everyone can see
the original.


[*] SHA-1 was never intended to be used as a security measure in
Git---nor should it be; SHA-1 is effectively broken with the
demonstration of a freestart collision last year (where the attacker
controls the IV; but it's only a matter of time).  So if a collision can
be found for any of those signed SHA-1 hashes---or any hashes they
reference---_that actually makes sense to Git and humans_, then your
signature will still be perfectly valid.  But distribution archives are
also GPG-signed, so Git will never be the only place of reference.

I need to update my article, but I'm essentially saying that it's really
hard to have strong cryptographic assurances with Git even with signed
commits---that attack surface is simply too large, as I mentioned in the
Whonix discussion.  Realistically, it's extremely unlikely that
something will ever happen, but until Git switches to a secure hash
algorithm (...har har), don't expect full integrity.  If you're using
signatures for authorization primarily, then you don't really need to
worry.

-- 
Mike Gerwitz
Free Software Hacker | GNU Maintainer & Volunteer
https://mikegerwitz.com
FSF Member #5804 | GPG Key ID: 0x8EE30EAB
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 01:16:00 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.