From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8EN0ApzMCWYyRQEA62LTzQ:P1 (envelope-from ) for ; Sun, 31 Mar 2024 22:50:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 8EN0ApzMCWYyRQEA62LTzQ (envelope-from ) for ; Sun, 31 Mar 2024 22:50:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Q vOqIfv"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=lyIhZrbf; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711918236; a=rsa-sha256; cv=none; b=oBUBgENgKYJvpSTnwx63iCc1RHNSPzo/SiW7ynNuJeW+4PIIHldV6HtQXuHash+70qZfAR HMxSWMICs2GGFtDR6Rv2Ts1EDfM9b8nOzJXJ/SkDhiuKjvxJ2zmyzg4BZEUQjGe15WlYpX VTCTrrNGh88KkJwRbCZgcICSR33ZN/h6fPW14G7+zJgzKuJtBgDv6gxRbg+CPdydzuUH+W DAvAHBIN7jiWsjRPJnEQvxK5X5zeWedBkYnYvaTF3trbuGZRArT3TuMQWdOZzfGfRo2D7V XGnI9I42TAZPb/HFNRxy/f712iddU9JDnv+S+tYiEi3p5AAB0OaRWkSvC7Wlng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Q vOqIfv"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=lyIhZrbf; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711918236; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=FXWCFvnmiw7wSKuHJciaNEzTM2bLjIyyUlfdkUFbleQ=; b=YuEjCm0pO82mQ53c+YwXGS72Q29pt8ZBqVxXIyYLcC8W3pd/gw6PgKq+3yj5iUGQBFPTVd ZFVAraNd0kNafRwo6KTAE1PeE348k7Bp+OgWWLm8/91m7xhfiXIyiqToDtnMisB8EVR9AH Cx70/IN6+MMW6DhUUDQoYDePW8AUhf+S9c2TRG5MColvjCrYXGRkyghFJXCWjS8VLeO9Me vguFVf6Uimt9o27BBccQB7rGXcIJzzu1Gq+K6rXWrS3v8yBD+J9kf78oKidvnlSg801zol 4GSB9Tp+D6cEmFOeANCM2XtmsiS2t2rOyH+XnVolU8BlQIA/06c9U0Qb46JH1Q== 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 BE1CC1EEA8 for ; Sun, 31 Mar 2024 22:50:35 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rr27t-0002Oa-MR; Sun, 31 Mar 2024 16:50:01 -0400 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 1rr27s-0002Nr-1h for guix-patches@gnu.org; Sun, 31 Mar 2024 16:50:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rr27r-0000WH-OG for guix-patches@gnu.org; Sun, 31 Mar 2024 16:49:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rr27u-0000oX-9n for guix-patches@gnu.org; Sun, 31 Mar 2024 16:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70113] [PATCH 1/1] gnu: libarchive: Fix a potential security issue. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Mar 2024 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70113 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70113@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17119181482937 (code B ref -1); Sun, 31 Mar 2024 20:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Mar 2024 20:49:08 +0000 Received: from localhost ([127.0.0.1]:48600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rr271-0000lH-V5 for submit@debbugs.gnu.org; Sun, 31 Mar 2024 16:49:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rr26z-0000jo-Dc for submit@debbugs.gnu.org; Sun, 31 Mar 2024 16:49:06 -0400 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 1rr26q-0002BJ-Ki for guix-patches@gnu.org; Sun, 31 Mar 2024 16:48:57 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rr26n-0008GD-6i for guix-patches@gnu.org; Sun, 31 Mar 2024 16:48:55 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id C625113800A5; Sun, 31 Mar 2024 16:48:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 31 Mar 2024 16:48:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=mesmtp; t=1711918130; x= 1712004530; bh=FXWCFvnmiw7wSKuHJciaNEzTM2bLjIyyUlfdkUFbleQ=; b=Q vOqIfvBtWaPqjKoOb/fRsVLcYyWubWWe2exfYUVzGQwT4SxhjEsx/P1NBT4aG3MD ddBHn0T4VnV9AuX1HkRbINch5oqR4yoDKXMBT7rPH6G8LPBqizizwHZ8pnXRF51S mMhtNlC+WXv/M6lIs5XTD8Y9BeqCNlv+6e8NgF0dMw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1711918130; x=1712004530; bh=FXWCFvnmiw7wS KuHJciaNEzTM2bLjIyyUlfdkUFbleQ=; b=lyIhZrbfD4RAfpfHCyY42bBzQriv6 4bRPr1Sj7iOinka89Uz4xZxp0J8vxSSt0gooWa45BZqe3yfjDEZXkzwiQS57jBLT ovkT1y8UtI+0NRNr4a5JnMQSnI5O+WgJgHnsti0iYAK5atM98zNEEe8wjfK6v6Jb bDZse7lW8udoU5yUYKw+FcnFvg0VMtclHEGrU/qRsCCtEgbLVoTgnJmDafqTPMPU PYvIf1AXnj/CH4f/Ovzfx5kYAJMqEcg5Ue1ajmBspWZhNopCVel8SIvDI/Htswpe RPJORTwusvRRI80YpzymBwAHav7hcSJ2cN2atsiuso5SSf4+J3H9PhcMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvkedgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpedvtdekgfejgfdvjefgueeuieefge ffteetieeihfdttdfgvdfgteevuddtieffgfenucffohhmrghinhepghhithhhuhgsrdgt ohhmpdhlihgsrghrtghhihhvvgdrohhrghdpshgvtghlihhsthhsrdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhu lhgrrhhirdhnrghmvg X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 31 Mar 2024 16:48:50 -0400 (EDT) From: Leo Famulari Date: Sun, 31 Mar 2024 16:44:51 -0400 Message-ID: <7a74261a419e9127887bc9ea096294e42156cce1.1711917891.git.leo@famulari.name> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=103.168.172.144; envelope-from=leo@famulari.name; helo=fout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -0.96 X-Migadu-Queue-Id: BE1CC1EEA8 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -0.96 X-TUID: /XNIWVW7cZVX https://github.com/libarchive/libarchive/pull/2101 * gnu/packages/backup.scm (libarchive)[replacement]: New field. (libarchive/fixed): New variable. * gnu/packages/patches/libarchive-remove-potential-backdoor.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Change-Id: I939e9b842b10d1a78125da4a4599c38d9c037079 --- gnu/local.mk | 1 + gnu/packages/backup.scm | 19 ++++++++ ...libarchive-remove-potential-backdoor.patch | 47 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 gnu/packages/patches/libarchive-remove-potential-backdoor.patch diff --git a/gnu/local.mk b/gnu/local.mk index f2b480bded..68c6851402 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1575,6 +1575,7 @@ dist_patch_DATA = \ %D%/packages/patches/liba52-use-mtune-not-mcpu.patch \ %D%/packages/patches/libaio-32bit-test.patch \ %D%/packages/patches/libaio-riscv-test5.patch \ + %D%/packages/patches/libarchive-remove-potential-backdoor.patch \ %D%/packages/patches/libbase-fix-includes.patch \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 604102bc7b..5dfdfe7dd4 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -259,6 +259,7 @@ (define-public hdup (define-public libarchive (package (name "libarchive") + (replacement libarchive/fixed) (version "3.6.1") (source (origin @@ -347,6 +348,24 @@ (define-public libarchive @command{bsdcat}, @command{bsdcpio} and @command{bsdtar} commands.") (license license:bsd-2))) +(define-public libarchive/fixed + (package + (inherit libarchive) + (version "3.6.1") + (source + (origin + (method url-fetch) + (uri (list (string-append "https://libarchive.org/downloads/libarchive-" + version ".tar.xz") + (string-append "https://github.com/libarchive/libarchive" + "/releases/download/v" version "/libarchive-" + version ".tar.xz"))) + (patches (search-patches "libarchive-remove-potential-backdoor.patch")) + (sha256 + (base32 + "1rj8q5v26lxxr8x4b4nqbrj7p06qvl91hb8cdxi3xx3qp771lhas")))))) + + (define-public rdup (package (name "rdup") diff --git a/gnu/packages/patches/libarchive-remove-potential-backdoor.patch b/gnu/packages/patches/libarchive-remove-potential-backdoor.patch new file mode 100644 index 0000000000..2b9a9e2ffe --- /dev/null +++ b/gnu/packages/patches/libarchive-remove-potential-backdoor.patch @@ -0,0 +1,47 @@ +Remove code added by 'JiaT75', the malicious actor that backdoored `xz`: + +https://github.com/libarchive/libarchive/pull/2101 + +At libarchive, they are reviewing all code contributed by this actor: + +https://github.com/libarchive/libarchive/issues/2103 + +See the original disclosure and subsequent discussion for more +information about this incident: + +https://seclists.org/oss-sec/2024/q1/268 + +Patch copied from upstream source repository: + +https://github.com/libarchive/libarchive/pull/2101/commits/e200fd8abfb4cf895a1cab4d89b67e6eefe83942 + +From 6110e9c82d8ba830c3440f36b990483ceaaea52c Mon Sep 17 00:00:00 2001 +From: Ed Maste +Date: Fri, 29 Mar 2024 18:02:06 -0400 +Subject: [PATCH] tar: make error reporting more robust and use correct errno + (#2101) + +As discussed in #1609. +--- + tar/read.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tar/read.c b/tar/read.c +index af3d3f42..a7f14a07 100644 +--- a/tar/read.c ++++ b/tar/read.c +@@ -371,8 +371,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer) + if (r != ARCHIVE_OK) { + if (!bsdtar->verbose) + safe_fprintf(stderr, "%s", archive_entry_pathname(entry)); +- fprintf(stderr, ": %s: ", archive_error_string(a)); +- fprintf(stderr, "%s", strerror(errno)); ++ safe_fprintf(stderr, ": %s: %s", ++ archive_error_string(a), ++ strerror(archive_errno(a))); + if (!bsdtar->verbose) + fprintf(stderr, "\n"); + bsdtar->return_value = 1; +-- +2.41.0 + -- 2.41.0