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 CNY7MciUwWMpsgAAbAwnHQ (envelope-from ) for ; Fri, 13 Jan 2023 18:28:40 +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 YDhFMciUwWN0kQAA9RJhRA (envelope-from ) for ; Fri, 13 Jan 2023 18:28:40 +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 A16C116F55 for ; Fri, 13 Jan 2023 18:28:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGNgy-0001QJ-7c; Fri, 13 Jan 2023 12:18:12 -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 1pGNgo-0001LK-9f for bug-guix@gnu.org; Fri, 13 Jan 2023 12:18:04 -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 1pGNgn-0001H4-Us for bug-guix@gnu.org; Fri, 13 Jan 2023 12:18:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGNgn-0002DI-Q2 for bug-guix@gnu.org; Fri, 13 Jan 2023 12:18:01 -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: Fri, 13 Jan 2023 17:18:01 +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?= , 60782@debbugs.gnu.org Received: via spool by 60782-submit@debbugs.gnu.org id=B60782.16736302248439 (code B ref 60782); Fri, 13 Jan 2023 17:18:01 +0000 Received: (at 60782) by debbugs.gnu.org; 13 Jan 2023 17:17:04 +0000 Received: from localhost ([127.0.0.1]:52287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGNfq-0002Bs-Lg for submit@debbugs.gnu.org; Fri, 13 Jan 2023 12:17:04 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:40903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGNfj-0002B5-IM for 60782@debbugs.gnu.org; Fri, 13 Jan 2023 12:16:59 -0500 Received: by mail-wr1-f48.google.com with SMTP id r2so21686697wrv.7 for <60782@debbugs.gnu.org>; Fri, 13 Jan 2023 09:16:55 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8Bvqqaagw89mV6msUE+wNr2iqou9VS/piQbxYfpdxbw=; b=J5SFVQcdkdsoo8rYOKb+vI0VvhawBRY3qhx86V+xaRqi5v6IK9dU/DnSvMhJY9I34R RhVoDc+S1EUUtu+v8vy60WtKg10vPn4jHZEjVn+mfESwfxV4LtSuXVuIBNswnDRjHBQD ZXn++7WuZhrrNg5R7zQ/W1c7+fFVYGHLOwfS0REDoq7/UJb5iQm/VZZ9VwCTXVS2QnB1 nNjBA9U1h+TVd1LxCHj8FkWLq32tPoWq7QhQlkWX6DW3mSHSeqn7R+N/5HFqBSDmaqBY ovyhD4PghbgwC6H0xRV3k6NIf0F3eVv0y4AWmbqY8Q7IPua1slIiSk8wCEuT+81yBZSe Wbaw== 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:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=8Bvqqaagw89mV6msUE+wNr2iqou9VS/piQbxYfpdxbw=; b=413DyzNXfCUEmlLKwceB2VFSNqOkai5irEG7S4Xa6L5dAyT/HThj1WjWgtkTHEnFcf Gq+EvWEVnylq721jchlAzMnw+SbSPHwxMd7URPG7K8sTlortOwXW9Acurhhb9celkysc UCrNxfxly3SxPXsxdccDrFZuO9bGz67Xsw23V1rIvzHIiygsaXHevkFb07lP6cKxaZ96 eIEHbZ53y1GXm57mMx+4yw4W2oZ7ST/D6TUI0FPFiJNKPX6VG/5QEY2odo7HTMhOznwx W07eWE7NbIzsZEbVu3+q/topgZh8yJ2jOVXT70O0Noy89UBkUm46btlQ7hWZZczEnG8l RXHg== X-Gm-Message-State: AFqh2kpl9l8Vu60PGrU/c7qASplF+kExXkt1icatWL/FoaldOp09PP1O hjDI/ces7PkJFXgonRsaDMTGU3+9RzM= X-Google-Smtp-Source: AMrXdXsgkdq0ZDAi3QSQqYlZ+U4W7o6XHzm5FCqmeZ+YgOs3ZXhvw73oXPEnoJjA4BNzMrfSVlzvOg== X-Received: by 2002:a5d:4842:0:b0:2bb:62bf:f5cb with SMTP id n2-20020a5d4842000000b002bb62bff5cbmr3542866wrs.4.1673630209851; Fri, 13 Jan 2023 09:16:49 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id t6-20020adfe446000000b002bb28209744sm19150946wrm.31.2023.01.13.09.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 09:16:49 -0800 (PST) From: Simon Tournier In-Reply-To: <87r0vybl4q.fsf@inria.fr> References: <87r0vybl4q.fsf@inria.fr> Date: Fri, 13 Jan 2023 18:16:41 +0100 Message-ID: <87sfgeuzgm.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=J5SFVQcd; 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=1673630920; a=rsa-sha256; cv=none; b=SjZrUefXuHmYDJsAywS7OUzFGHXLlHpi8tRvpWTQwizXf1CbFBHyGCslqBfaIkk6sCKqiM 9nrovjjSXAyWSYRCBXb91CGxFxe+WcV7sIv7zc3FRxN57AW0ZIj39M/QIPRAy97GsdK1Mk lPusrH015ObR+6CYD2/zZHrOxmj8oESXl9IxCpSE3T11i9DyLpspgFQLV4SRutXI2l1WG3 cbQgncPL+wIXQWEN5AquRFq1L+lM5EDejrdCMAC1V7mymUR3hcPzqrJZ3mqBrJvhqlHbHi DnqlKDLc0/07YFXa5UwnWwqs6jn/TqPF0mpAcXTOiuAXS7AFdStWST3mAqaKhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673630920; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=8Bvqqaagw89mV6msUE+wNr2iqou9VS/piQbxYfpdxbw=; b=afE1tP9FTLGQJ3Vu2hxhpGaQ7Janau6uJqoN1ALcZ1/NdS1P2zc6rovvTtauFYyUitDDNm VteNxzZy88AT3pMWyNc7jrX07v6nTzXKc08CZqCspmcVQG5fLXp7oaKxvBLncTwhdcouSL 3XqwNUbtx8Ll9jqk0zEhTTE0HoRvde/UcuvFYtsS3kMl4V7ckQC7E7K5rlPgKcrj8Lfr+n dBqI9WWkEeOabLYjdSnGmmAYrAZRR2NmlbzW68K0YCLmRpY+NEvmCNz1C4Xf55pg+i2n9Z zuroQwndsiKUd/1WW8LARJjda0+yIJ4IJoUKgwgq2BCYVAmFxRC8hflsYJ8YPw== X-Migadu-Queue-Id: A16C116F55 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=J5SFVQcd; 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: -2.10 X-Spam-Score: -2.10 X-TUID: 35n9Oix6Ppnh Hi, On ven., 13 janv. 2023 at 14:48, Ludovic Court=C3=A8s wrote: > Nothing, because the =E2=80=98guix=E2=80=99 channel always comes first in= the module > search path (see =E2=80=98%package-module-path=E2=80=99 in (gnu packages)= ). Good. > > Now same scenario, but with references to another channel, for example > (@ (past packages boost) boost-1.68) provided by Guix-Past. The PyPI attack used to comprised PyTorch exploits that the PyPI index takes precedence and sadly PyPI is not curated. https://github.com/pypa/pip/issues/8606 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. ;-) > This time, if the user pulls in an additional channel that also provides > (@ (past packages boost) boost-1.68), we do not know which one is going > to take precedence. It may go unnoticed though, because > =E2=80=98channel-instances->derivation=E2=80=99 calls =E2=80=98profile-de= rivation=E2=80=99, which uses > =E2=80=98build-profile=E2=80=99, which calls =E2=80=98union-build=E2=80= =99 with the default file > collision policy, which is to warn (the warning only appears in the > build log). > > I think it would be best to error out if multiple channels provide > same-named files. Yes, it could be a counter-measure. Aside the security risk, it even appears to me sane to error because this collision leads to an undefined behaviour. And such undefined behaviour should be removed; they are never a good thing. Cheers, simon