all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Giovanni Biscuolo" <g@xelera.eu>,
	"Ludovic Courtès" <ludovic.courtes@inria.fr>,
	guix-devel@gnu.org
Subject: Re: Tricking peer review
Date: Wed, 20 Oct 2021 11:10:44 +0200	[thread overview]
Message-ID: <86r1cgcb8r.fsf@gmail.com> (raw)
In-Reply-To: <87czo0m7fu.fsf@xelera.eu>

Hi,

On Wed, 20 Oct 2021 at 10:22, Giovanni Biscuolo <g@xelera.eu> wrote:

> I think the "final" result of this discussion should be condensed in a
> few (one?) additional paragraphs in the Contributing section of the Guix
> manual

Run “guix lint” is already listed.  What do you have in mind about more
additions?


> Well done Simon: AFAIU this is a complete analisys of the possible
> "source" attacks, or is something missing?

To my knowledge, yes it is exhaustive with the current situation about
tricking the content-addressed system.

On the top of that, it is addressed by hash functions; it is thus
vulnerable to preimage attack of such hash functions.  SWH uses SHA-1 to
address and I do not know how they address potential collisions.

For instance, the cost for SHA-1 [1] is still really expensive.  Well,
for interested reader, one can read the discussion here [2].  SHA-1 is
2^160 (~10^48.2) and compare to 10^50 which is the estimated number of
atoms in Earth.  Speaking about content-addressability, SHA-1 seems
fine.  We are speaking about content-addressability not about using
SHA-1 as hash function for security, IMHO.  It is the same situation as
Git, for instance.

The surface of attack is very low because:

 a) SWH is an archive and not a forge,
 b) a chosen-prefix attack [3] could no work if review is correctly done;
    which means run “guix lint”,
 c) an attacker has to trick the checksum (SHA-256) and the address
    (SHA-1); at various locations: Guix history (now signed), SWH,
     Disarchive-DB.

1: <https://shattered.it/>
2: <http://issues.guix.gnu.org/issue/44187#4>
3: <https://sha-mbles.github.io/>

>>> Also, just because a URL looks nice and is reachable doesn’t mean the
>>> source is trustworthy either.  An attacker could submit a package for an
>>> obscure piece of software that happens to be malware.  The difference
>>> here is that the trick above would allow targeting a high-impact
>>> package.
>>
>> I agree.
>
> I also agree (obviously) and I think this kind of attack should also be
> documented in the manual (if not already done)

Well, nothing new here, IMHO.  A distribution relies on content, i.e.,
any distribution points to that content.  Whatever the nature of the
pointing arrow (URL, Git commit, hash, etc.), the pointed material must
be carefully checked at package time; as explained by «Submitting
Patches» [4]. :-) That’s why I am advocating [5] that:

         new packages should *always* go via guix-patches, wait 15 days,
        then push if no remark.  It lets the time for the community to
        chime in.  And if not, it just slows down for 2 weeks.


4: <https://guix.gnu.org/manual/devel/en/guix.html#Submitting-Patches>
5: <https://lists.gnu.org/archive/html/guix-devel/2021-10/msg00110.html>

Cheers,
simon


  reply	other threads:[~2021-10-20  9:21 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 18:54 Tricking peer review Ludovic Courtès
2021-10-15 22:03 ` Liliana Marie Prikler
2021-10-15 22:28   ` Ryan Prior
2021-10-15 22:45     ` Liliana Marie Prikler
2021-10-15 22:59       ` Ryan Prior
2021-10-18  7:40     ` Ludovic Courtès
2021-10-18 19:56       ` Ryan Prior
2021-10-19  8:39       ` zimoun
2021-10-20 23:03         ` Leo Famulari
2021-10-21  8:14           ` zimoun
2021-10-15 23:13   ` Thiago Jung Bauermann
2021-10-18  7:47     ` Ludovic Courtès
2021-10-18  7:34   ` Ludovic Courtès
2021-10-19  8:36 ` zimoun
2021-10-19 12:56   ` Ludovic Courtès
2021-10-19 14:22     ` zimoun
2021-10-19 15:41       ` Incentives for review Ludovic Courtès
2021-10-19 16:56         ` zimoun
2021-10-19 19:14         ` Ricardo Wurmus
2021-10-19 19:34           ` Christine Lemmer-Webber
2021-10-19 19:50           ` Joshua Branson
2021-10-21 20:03           ` Ludovic Courtès
2021-10-20 21:37         ` Thiago Jung Bauermann
2021-10-21 13:38           ` Artem Chernyak
2021-10-22 20:03             ` Thiago Jung Bauermann
2021-10-23  1:43               ` Kyle Meyer
2021-10-23  3:42                 ` Thiago Jung Bauermann
2021-10-23  7:37                 ` zimoun
2021-10-23 16:18                   ` public-inbox/elfeed -> Maildir bridge (was: Incentives for review) Kyle Meyer
2021-10-24 12:18                   ` Jonathan McHugh
2021-10-21 16:06           ` Incentives for review Ricardo Wurmus
2021-10-21 16:32             ` zimoun
2021-10-22 20:06             ` Thiago Jung Bauermann
2021-10-21 15:07         ` Katherine Cox-Buday
2021-10-21 16:10           ` Ricardo Wurmus
2021-10-21 17:52             ` Katherine Cox-Buday
2021-10-21 18:21             ` Arun Isaac
2021-10-21 19:58               ` Ludovic Courtès
2021-10-21 21:42               ` Ricardo Wurmus
2021-10-22 10:48                 ` Arun Isaac
2021-10-22 11:21                   ` zimoun
2021-10-23  6:09                     ` Arun Isaac
2021-10-22 10:56                 ` Jonathan McHugh
2021-10-22  7:40               ` zimoun
2021-10-22 11:09                 ` Arun Isaac
2021-10-22  8:37               ` Jonathan McHugh
2021-10-22  9:15                 ` zimoun
2021-10-22 10:40                 ` Jonathan McHugh
2021-10-22 11:32                   ` zimoun
2021-10-21 21:18             ` Jonathan McHugh
2021-10-22 10:44               ` Arun Isaac
2021-10-22 11:06               ` Jonathan McHugh
2021-10-21 21:22           ` zimoun
2021-10-28 14:57             ` Katherine Cox-Buday
2021-10-21 17:51         ` Vagrant Cascadian
2021-10-24 11:47           ` Efraim Flashner
2021-10-20  8:22   ` Tricking peer review Giovanni Biscuolo
2021-10-20  9:10     ` zimoun [this message]
2021-10-20  8:29   ` patches for new packages proper workflow (Re: Tricking peer review) Giovanni Biscuolo
2021-10-20 23:09 ` Tricking peer review Leo Famulari
2021-10-21  7:12   ` Ludovic Courtès
2021-10-25 13:09 ` Christine Lemmer-Webber
2021-10-28  8:38   ` Ludovic Courtès

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=86r1cgcb8r.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=g@xelera.eu \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.