From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 mCbGJYZKC2MleQEAbAwnHQ (envelope-from ) for ; Sun, 28 Aug 2022 12:59:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KF6kJYZKC2NzPQEAauVa8A (envelope-from ) for ; Sun, 28 Aug 2022 12:59:18 +0200 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 7788617825 for ; Sun, 28 Aug 2022 12:59:18 +0200 (CEST) Received: from localhost ([::1]:43322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSG0b-0000a4-NU for larch@yhetil.org; Sun, 28 Aug 2022 06:59:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSG0N-0000QI-02 for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSG0M-0004vw-N1 for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSG0M-0001EJ-Ix for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55399: [PATCH 1/2] guix: Disable owner validation. References: In-Reply-To: Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 28 Aug 2022 10:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55399 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 55399@debbugs.gnu.org Cc: =?UTF-8?Q?Andr=C3=A9?= Batista , Maxime Devos Received: via spool by 55399-submit@debbugs.gnu.org id=B55399.16616843194690 (code B ref 55399); Sun, 28 Aug 2022 10:59:02 +0000 Received: (at 55399) by debbugs.gnu.org; 28 Aug 2022 10:58:39 +0000 Received: from localhost ([127.0.0.1]:57683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSFzz-0001Da-4X for submit@debbugs.gnu.org; Sun, 28 Aug 2022 06:58:39 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:53150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSFzr-0001D7-S8 for 55399@debbugs.gnu.org; Sun, 28 Aug 2022 06:58:34 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by baptiste.telenet-ops.be with bizsmtp id CyyV2800920ykKC01yyVDt; Sun, 28 Aug 2022 12:58:30 +0200 From: Maxime Devos Date: Sun, 28 Aug 2022 12:58:26 +0200 Message-Id: <20220828105827.26161-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1661684310; bh=AlGgcz12DhwPIjv9mFcEnpDVWGLLooc+fGUhx/H3O5g=; h=From:To:Cc:Subject:Date; b=MWMOyMri8l4NalXrQwfthFpRO4pi3Y+A4aEENWLYRtknEIZHqdUXPlHWS9760GvDb zhXnDkC3AH3aJN0mPkCRYFuOMPTQxbnGndikVxJ9cxlIAiq6KQo+twnqNhlIGEC9vq Kb+mSq2GfHF7LYmkyctyJppNm4/Ucuf3qT3ujS74TgjZUdGJiGF1no7M+WM4TSVDnp VocZoqWo+O8OQyop4j1gn1lF7MLnFuVg61aqyRs7kRnR21loqqDrrL7tmAOBVBA+Y5 Fr0wRv/vwlCKEBa3WhEDVMkHVr3gMdIofxpHAH5n63QjQVmQ9dGINaH/IY2jaV2zbv BXtNhKrU3Etfw== 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661684358; 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=AlGgcz12DhwPIjv9mFcEnpDVWGLLooc+fGUhx/H3O5g=; b=clGQuHv9EZigBCIocPkspPwv5cs+eZ6mt/iqjdpnnC94Zp5m/un32kbb+FoDgim8eRHTLh MmfV+oRmD1lBP56hXUf7aDgvkUPlR5vLXTdGCZVtnfVvvpo12eYC1VZhrNTl+OawNtj1Ih NEcykDSpgb4Cr+vqAZ7luVOj344ud5509AMLK/khzCpTxH8+6AEDeL/oy59P5q8g9SGPbX rcfINYv2iutDds6fGaBWxPxkd6W49yprTxFI9YIK7CBEfM2lUqtNfQ4KHuJh2KzRBa3VWG z96Ib8c7pouFKfppweB0TBoiXfLL8xaV0vPAJBnKoZ4zTtfjSqPOnGLz6xpXVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661684358; a=rsa-sha256; cv=none; b=a8ckQApmNKKfr2YfLxmeMF6Bl9w5g6capaN0BpijhBOFoKosZYjp97Hanv2zI5UFG4LWRt +PZul1ZsOrHFrumqtZECx/y4akYpmH66cupSkf+K3va+IuK+c2QXiU1crPO6OHMLX9Z43E P2a0aIQ0AxFjwpVtgOdYwaI+ZLxfWmKcu+y0mLyNMBv3hRIDoH5j8GGcOd4ZPWZQ9uGuHx Vwxr8U0XSt6knYztbZ7rHz+zEi6bdO159mDnZpw/3+s9ODc4JIB8niT7WXtjecfLEjI0QY Y1BLWWoMACILz7T1A36uuRfLY77L6qxUOXZGc89/U12e5CB5UZ+qH9kV+YnrbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=MWMOyMri; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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" X-Migadu-Spam-Score: 8.61 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=MWMOyMri; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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" X-Migadu-Queue-Id: 7788617825 X-Spam-Score: 8.61 X-Migadu-Spam: Yes X-Migadu-Scanner: scn1.migadu.com X-TUID: uBPPVLYQ+IKs The original patch disabled it only when updating cached checkouts, but the disabling persisted afterwards, making it stateful. To avoid statefulness, it is disabled during with-libgit2 instead. For compatibility with guile-git versions that do not yet have set-owner-validation!, the setting is skipped when set-owner-validation! does not exist. * guix/git.scm (update-cached-checkout): Disable owner validation checks. Co-Authored-By: André Batista --- guix/git.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guix/git.scm b/guix/git.scm index 53e7219c8c..0fe6e65549 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2021 Kyle Meyer ;;; Copyright © 2021 Marius Bakke ;;; Copyright © 2022 Maxime Devos +;;; Copyright © 2022 André Batista ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,6 +24,7 @@ (define-module (guix git) #:use-module (git) #:use-module (git object) + #:use-module (git settings) #:use-module (git submodule) #:use-module (guix i18n) #:use-module (guix base32) @@ -117,6 +119,16 @@ (define-syntax-rule (with-libgit2 thunk ...) ;; but pointer finalizers used in guile-git may be called after shutdown, ;; resulting in a segfault. Hence, let's skip shutdown call for now. (libgit2-init!) + ;; libgit2@1.4.3 ‘fixed’ a git CVE it never shared, breaking some uses + ;; of Guix channels (see ). Disable + ;; the owner validation that does not fit in the security model in Guix. + ;; + ;; For compatibility with old guile-git that do not have + ;; 'set-owner-validation!', do nothing if 'set-owner-validation!' + ;; does not exist. + ((catch 'unbound-variable + (lambda () set-owner-validation!) + (lambda _ identity)) #false) (unless %certificates-initialized? (honor-system-x509-certificates!) (set! %certificates-initialized? #t)) base-commit: d519305d83d08058e4def2c4d72fe62102d9599d prerequisite-patch-id: 62949e6148bb8aae2f792aaf4d54f2a136351d28 prerequisite-patch-id: 72191ec47cb3876c5fcd6233880dea7dfc1b165f prerequisite-patch-id: bbfd96d673e491ddd684e8270c90347547dceaa5 prerequisite-patch-id: fbdac7446d0c3f529f313f89cb9ba975d469d7ac prerequisite-patch-id: d0a5804a92d868c5ee6726e6e0555a8af25e442c -- 2.37.1