From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kPQgD6o6xWMxEAEAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 12:53:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MAogD6o6xWMYggEA9RJhRA (envelope-from ) for ; Mon, 16 Jan 2023 12:53:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F1406C2FF for ; Mon, 16 Jan 2023 12:53:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHO2y-0004rn-LQ; Mon, 16 Jan 2023 06:53:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHO2w-0004pg-Sh for bug-guix@gnu.org; Mon, 16 Jan 2023 06:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHO2w-0003tC-Jd for bug-guix@gnu.org; Mon, 16 Jan 2023 06:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHO2w-0005lu-F4 for bug-guix@gnu.org; Mon, 16 Jan 2023 06:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60782: Channels and dependency confusion Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 16 Jan 2023 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60782 X-GNU-PR-Package: guix X-GNU-PR-Keywords: security To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 60782@debbugs.gnu.org Received: via spool by 60782-submit@debbugs.gnu.org id=B60782.167386992722117 (code B ref 60782); Mon, 16 Jan 2023 11:53:02 +0000 Received: (at 60782) by debbugs.gnu.org; 16 Jan 2023 11:52:07 +0000 Received: from localhost ([127.0.0.1]:60632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHO22-0005kX-Lk for submit@debbugs.gnu.org; Mon, 16 Jan 2023 06:52:07 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:43904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHO1w-0005jL-Ei for 60782@debbugs.gnu.org; Mon, 16 Jan 2023 06:52:00 -0500 Received: by mail-wm1-f46.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so21950995wms.2 for <60782@debbugs.gnu.org>; Mon, 16 Jan 2023 03:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tndJ7xd+l531lGnQahv7girSh5yY6mqAlegASivYn1o=; b=YdoyRZeJthyFlapmxIqtN1k0lqPCob7rwFx0roGEtYgVdIGpFJUwvppSIQLxhDyq97 OzEy4cO1alXWypPnGnBwUDueIr0/RtXQyANKBHLdMU4MjF8xqbzHVXYPYWJ+sikNdPkV shndbD3rmOCHvjmLbDoU/pNMWOpIAwuYSbl51Jw5iiZG52zKo8Z8SjR51odjgH0ZBP4v LbKrxZ2M/rY2poByJXD9bmNelUl+mJFGBHebzp5fF/8pggSkFk09xkVXwmIP5FgH4gAD rlQMd+vHYU5c4YDABCg//n1PmqruV/BcQtrS6msE3MdLXa2J0ichA9U7G6KuMfkqO2CG cXew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tndJ7xd+l531lGnQahv7girSh5yY6mqAlegASivYn1o=; b=rzZ1vevWfZGaB1E3Lwe0MZ3Zaj13YVLaewqQOxXImBCcl0k8ks+6R2jyRYxOXhCgX6 XdrEa/ncEpZi3Chs58m7yl0r2fsep/drfFPFCGrt6dS+ipGmb54X5ciyI2e5Ji7CjMDM 3ppuyzivwBqCwWQHaOTVhOQ/HMrnfuWbzye/sCNj2RoanYVgmZXErIS+GoCbruU2a0II xh2DX2fiThQnHn/Y83YcA8r41I5CF6BuT5ZLrJNtQ4zxfSqFOXfE0WfbbjWyYw5vQ0TN +pwJC48RuzMZeFQnTUffEAl6m1Qjd0KHK+OVeV0ADo3gQdDUotQXnVos0FR1/38IwCC7 jYOA== X-Gm-Message-State: AFqh2koUuwVNWSB0RgF32w+pdmeaJBp+Ry7KmykIEPIf0SRXyRlq3h7X orttPfgp2DxfNxfNxR/dG8qCWt+EaIo= X-Google-Smtp-Source: AMrXdXsG66fjlIMEsY2SYmWrQUuwSR3tN15ODIBBy06A2MlRx9xuYkQ51Z2P3+z+DFW1+HxfJMUz4A== X-Received: by 2002:a05:600c:348b:b0:3d2:231a:cb30 with SMTP id a11-20020a05600c348b00b003d2231acb30mr19031363wmq.3.1673869914892; Mon, 16 Jan 2023 03:51:54 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id bi6-20020a05600c3d8600b003d9df9e59c4sm30662675wmb.37.2023.01.16.03.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 03:51:54 -0800 (PST) From: Simon Tournier In-Reply-To: <87cz7e7t2m.fsf@inria.fr> References: <87r0vybl4q.fsf@inria.fr> <87sfgeuzgm.fsf@gmail.com> <87cz7e7t2m.fsf@inria.fr> Date: Mon, 16 Jan 2023 12:18:58 +0100 Message-ID: <874jsqvial.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YdoyRZeJ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673869994; a=rsa-sha256; cv=none; b=MCJdeW/riEUP/08lHWCRTJ67b1KAHXhcXtRHKDb6f06ISa75ikjhH4+7+W8iaUvSHc11b3 4lDxJYyXcJOD1HC1tN4bNubRTj36Vd9QL6rOVc73N4JU5XfUbLztu7Koc1GP1IlPz0eNCL 5i9DAWvxYIxPBs2SyrqKmBodtkan3cic6sk4ExgtKv4/xpM28ZkxS7drVg5vPnfyYu1XFr xKUGECVC0FYguBw6exkfYjVinFSA0yy9DjdU0APca69DhKibtOKHZ6tSbA0HTjqGr8aT8O Jaj1LjvHDaSn/GrrHbr2HIsn9YAN8O9hXVvftYRaR5uknJjtVmgT/OZiFheWzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673869994; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tndJ7xd+l531lGnQahv7girSh5yY6mqAlegASivYn1o=; b=UmGQHMZPxiQWLHJJxrUBh8kV9RQ8UrTP7z1rPPD0tk7CQWfk1z3pmsAkbKiKNAS0gcjXJM w6pD1o8xiNTZ8cKtnFVJGT9j1lOIlrhE/dHcYRM3y7gYk5/ZsF5BIxitrv0wRGtR0n7xpP jww3Ng5U6C5Mf08qFb//3ZJmQ66onh/HsNqTyKk0SbBz3+WRE6GL/XAnzdMyfZICavGhm8 Hwk0NdFod+GWKcE5s6YCcWcEb77/Dwn73bnjO1G0qFEP1EtHo55br1yGEkTzQvkxja2The /7NMQ6Ef9kg0G/SakJY1qn5s//mEPRAaQR3AXaALNdzZxZ5zhUkKlNlrW6u+bw== X-Migadu-Queue-Id: F1406C2FF X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YdoyRZeJ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Spam-Score: -1.82 X-Spam-Score: -1.82 X-TUID: G+BkSJyVt6oi Hi, On lun., 16 janv. 2023 at 10:00, Ludovic Court=C3=A8s wrote: >> Well, the assumption for a similar attack using Guix channels is that >> the user first adds the channel to their channel list. Therefore, they >> trust what they consider able to be trust. ;-) > > Right, users would have to explicitly add the offending channel to their > channel list in the first place. (And there are many other ways channel > code could mess up with one=E2=80=99s machine.) To be precise, the user must add a compromised channel; either compromised by the packages which this channel offers or either by some dependencies channel of this very same channel. For instance, consider the user adds the channel guix-bimsb which contains this .guix-channel [1] file: --8<---------------cut here---------------start------------->8--- (channel (version 0) (dependencies (channel (name guix-past) (url "https://gitlab.inria.fr/guix-hpc/guix-past")) (channel (name guix-science) (url "https://github.com/guix-science/guix-science.git")))) --8<---------------cut here---------------end--------------->8--- Here, the user could be compromised if the attacker is able to compromise guix-past or guix-science. The user who trusts guix-bimsb is maybe not aware of this recursive dependencies; but because they trust guix-bimsb in the first place, somehow it means they trust people behind guix-bimsb to check that guix-past or guix-science is not compromised. Well, somehow it is a web of trust. And if all channels are using authentication, then the attack is hard, no? 1: Cheers, simon