From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2OSkB/Qo9GHCpwAAgWs5BA (envelope-from ) for ; Fri, 28 Jan 2022 18:33:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aL/iBPQo9GGorAAA9RJhRA (envelope-from ) for ; Fri, 28 Jan 2022 18:33: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 B1787448B3 for ; Fri, 28 Jan 2022 18:33:39 +0100 (CET) Received: from localhost ([::1]:48700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDV7y-0000mO-To for larch@yhetil.org; Fri, 28 Jan 2022 12:33:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDV7Y-0000lD-Vg for guix-patches@gnu.org; Fri, 28 Jan 2022 12:33:13 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDV7P-00007P-17 for guix-patches@gnu.org; Fri, 28 Jan 2022 12:33:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDV7O-0000vX-2q; Fri, 28 Jan 2022 12:33: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: maximedevos@telenet.be, attila@lendvai.name, guix-patches@gnu.org Resent-Date: Fri, 28 Jan 2022 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53608@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Maxime Devos , Attila Lendvai Received: via spool by submit@debbugs.gnu.org id=B.16433911253489 (code B ref -1); Fri, 28 Jan 2022 17:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jan 2022 17:32:05 +0000 Received: from localhost ([127.0.0.1]:60415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDV6T-0000uC-13 for submit@debbugs.gnu.org; Fri, 28 Jan 2022 12:32:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:49948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDV6Q-0000u3-4g for submit@debbugs.gnu.org; Fri, 28 Jan 2022 12:32:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDV6P-000068-T5 for guix-patches@gnu.org; Fri, 28 Jan 2022 12:32:01 -0500 Received: from [2001:470:142:3::e] (port=33450 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDV6P-0008PN-Ek; Fri, 28 Jan 2022 12:32:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=dq9IcKXPO6ORxKYv39S0RYu7MLL7ruLib5MV+thdYc4=; b=YuCKyOragxhdTQ Ewo9VoWYqpXDWK4L7fO4Mn0PrR7S7qKllvVbOICMQAD9YfhrMfUBDNv4SQs/vbWOwzLagiRjA1hdu IJWV4bXnWyh2ApPGLvaekDtzIVYsv1j+l1xxVeOEMnjaMCVbZDWeVTjUG8G8V/7mAW2ZxSQKOkBUG 7OU4oSbNLpTloDjsGrZ+nEpeLstxuNemSe/QQpD0IEPKRIWHLh+zMNwgF3kH6cnULtnhmrH5CqJL8 c4+iaozTM0RC5awpr4x/eVr1sK17Sb5ev0ehraEXm8IfM10ot2bR3bn9wV2tQQtvzLQPt0SUU96iB xCMJjGqURJNvr3Oh9/HA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=33808 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDV6M-00070m-Vx; Fri, 28 Jan 2022 12:31:59 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 28 Jan 2022 18:31:42 +0100 Message-Id: <20220128173142.7072-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1643391219; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dq9IcKXPO6ORxKYv39S0RYu7MLL7ruLib5MV+thdYc4=; b=koD681uBgbRYj1TtOT/BCkuptU8Be6YvImT2SiREZkHtjjed5xs3M2DwwQY45nVaBbFH0M gNr3/AAdNHxRtH07/amCTrUsoj9HzjEZkR1sqszK8dM1S1MauUm22gJ0KdeqoCWi+pnejF bRteAPl+4Ea7vQYj2ivdzAe2m375zGRECmNVS7CClNwxEQkfGySpcnOlyoebkwzsVAv1Yf 5qlKMzbaFF8NK/OVKkrkAq23BC5SctvARG32tDi89bbo9k/BeteoLVGYkxQTLoLaeiekJJ 6MCjzI8Ead1Wk7ZWiwXKNweuypVaGSpXZFKqodyu+wl2JrwwNrb7YjLfQR6TEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643391219; a=rsa-sha256; cv=none; b=qk0Wju37X53TSnrrVN7rXn8hS1IP1HIxDnk32vmIHC+9I+Eze4L+7hKK+AQ7ptSobaH55x 8tT3cotKi6IAVnnhfa7+yTBYgP3bqInfYAp5X5oR3FA0GLuw27u8GsMNeInViuviiys21Q jv9MaVXYOJwxGpPZO6a99mX2VcoDb/+rw4DOl2j3tS9+s+KgFqbD2CcdWR5smjRIemUpMt 7acvQUJPZUjs740Vu3LotN8ar0hrhbVAXmzGTdU05e4NZa0YGnr3pSaLqCHHCZTaYm3GcP XfCZJkkS9EDxmjEKanQalMXW4vsaU9qpP6Mg6NFPU9WkBJjvx5YdHMQRztzZbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YuCKyOra; 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.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YuCKyOra; 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: B1787448B3 X-Spam-Score: -3.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: yyJPTgHey+0W 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ès (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 -- 2.34.0