From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cB5rKeH4AmIYIQAAgWs5BA (envelope-from ) for ; Wed, 09 Feb 2022 00:12:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0E2xJuH4AmIzOQEA9RJhRA (envelope-from ) for ; Wed, 09 Feb 2022 00:12:33 +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 0B0282D13D for ; Wed, 9 Feb 2022 00:12:33 +0100 (CET) Received: from localhost ([::1]:38544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHZex-0000Zy-Mj for larch@yhetil.org; Tue, 08 Feb 2022 18:12:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHZVn-0000uK-16 for guix-patches@gnu.org; Tue, 08 Feb 2022 18:03:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHZVm-0001SJ-O3 for guix-patches@gnu.org; Tue, 08 Feb 2022 18:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHZVm-00075T-GK for guix-patches@gnu.org; Tue, 08 Feb 2022 18:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53608] [PATCH 0/2] Rejecting commits unrelated to the introductory commit Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Feb 2022 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch security To: 53608@debbugs.gnu.org Cc: Attila Lendvai , Maxime Devos Received: via spool by 53608-submit@debbugs.gnu.org id=B53608.164436134027187 (code B ref 53608); Tue, 08 Feb 2022 23:03:02 +0000 Received: (at 53608) by debbugs.gnu.org; 8 Feb 2022 23:02:20 +0000 Received: from localhost ([127.0.0.1]:49025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHZV6-00074Q-Jd for submit@debbugs.gnu.org; Tue, 08 Feb 2022 18:02:20 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:57536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHZV4-00074B-Vd for 53608@debbugs.gnu.org; Tue, 08 Feb 2022 18:02:19 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4B72C292; Wed, 9 Feb 2022 00:02:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mj-KrMdXo98b; Wed, 9 Feb 2022 00:02:12 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1C61A1ED; Wed, 9 Feb 2022 00:02:12 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220128173142.7072-1-ludo@gnu.org> Date: Wed, 09 Feb 2022 00:02:11 +0100 In-Reply-To: <20220128173142.7072-1-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 28 Jan 2022 18:31:42 +0100") Message-ID: <87leyl7yj0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4B72C292 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644361953; 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; bh=bPchrRBrxF9xaKzAb23lhE5920MShBjx2bMl10emd/w=; b=WrzV8G1dgPfRZCwzZL0Xkamv/Ua5FOiAvdLL7a/s1pY/IhZLTpAHPcf02Mrsdew5v2rAbn Kv/41Eyp0Orqcu9RofdX085CDh7iYGKGqIHxkO3QNnIu7ezk++ttQLHV0Vgs3txKyvlEXj 718jWbAQoNMr3uw0bnkwqT8sNOBGISEo4/7EI58fou4dijyRcynlSTN8MzwCvz2ZiFDpGG HAo3IaWUVJC+vTyAXUrwvyfJwy0nM/rv1LX0XUOXSOMXqR11OpIh88SKEc/glnWIvRp236 x4QA2EHuawO0NHXwgzE89PiO0P6fWEyMW6p/dg7QcRBsMMEoWx2PoUjkW+LJ+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644361953; a=rsa-sha256; cv=none; b=GLpNprkLtV9+sPVxIi8yPKbbJKVbi38A/1GgD4kzawSpUUVU7ZGGVU9I6FLs10UAmB3ECv 1KnwirEL5nBJtOwRmDwWQsMkakpL8VPfghwfYqHWxqFyiRrutDLT53HeZi9Po5gRpxPhIL W2jCDZSH1sw3By9gdhF4sgr6uOd13y7uZLUaFQqYkEtWdpwx8HEdAZriwfV64QVnMWMLNu Des7NIBgkPaPGGBHpRCPh+GpnuykUfLMMX+aWNUfet9fmCa2gNYhRlu/Q8naszX5noDsPt W+aNxhv99P6aWbWxdJMrEWVD+gd6103keadgyhDJrHxV30MeqzaZcJDqFDUCOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.63 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0B0282D13D X-Spam-Score: -3.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ioaf29XUyfg1 Howdy Maxime & Attila, Did you have a chance to look into this series? https://issues.guix.gnu.org/53608 It=E2=80=99s relatively simple but I=E2=80=99d rather have other eyeballs l= ooking at it. TIA. :-) Ludo=E2=80=99. Ludovic Court=C3=A8s skribis: > Hello! > > This patch series fixes a bug in the checkout authentication code: > it would be possible to authenticate a commit unrelated to the > introductory commit, provided that target commit passes the > authorization invariant (see the commit log for details). > > Users of Guix and of third-party channels are safe: this bug does > not have any impact on checkout authentication in those cases. > > What concrete cases are affected? Suppose someone forks Guix and > publishes a new channel introduction for their fork. The expectation > is that any branch started before the introductory channel, for > instance in the original Guix repo, would fail to be authenticated. > However, because of this bug, such a branch would be considered > authentic in the fork because all its commits pass the authorization > invariant (IOW, they are authentic in the original repository). > > Thoughts? > > Ludo'. > > Ludovic Court=C3=A8s (2): > git: Add 'commit-descendant?'. > git-authenticate: Ensure the target is a descendant of the > introductory commit. > > doc/guix.texi | 4 ++- > guix/git-authenticate.scm | 17 ++++++++-- > guix/git.scm | 24 +++++++++++++- > tests/channels.scm | 60 +++++++++++++++++++++++++++++++++- > tests/git-authenticate.scm | 44 +++++++++++++++++++++++++ > tests/git.scm | 52 ++++++++++++++++++++++++++++- > tests/guix-git-authenticate.sh | 17 ++++++++-- > 7 files changed, 210 insertions(+), 8 deletions(-) > > > base-commit: 5052f76afd02e27d6484acf74c86bfa1b6f9cd0e