From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EFHPBrRCXmCTMwAAgWs5BA (envelope-from ) for ; Fri, 26 Mar 2021 21:23:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gI7DALRCXmBmYwAA1q6Kng (envelope-from ) for ; Fri, 26 Mar 2021 20:23:16 +0000 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 7F94819FDE for ; Fri, 26 Mar 2021 21:23:15 +0100 (CET) Received: from localhost ([::1]:33414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPszC-000186-6X for larch@yhetil.org; Fri, 26 Mar 2021 16:23:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPsXu-0002u6-SP for bug-guix@gnu.org; Fri, 26 Mar 2021 15:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPsXu-0002xd-H1 for bug-guix@gnu.org; Fri, 26 Mar 2021 15:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lPsXu-000172-H1 for bug-guix@gnu.org; Fri, 26 Mar 2021 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47418: [PATCH] gnu: imagemagick: Fix CVE-2020-27829. References: In-Reply-To: Resent-From: =?UTF-8?Q?L=C3=A9o?= Le Bouter Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 26 Mar 2021 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47418 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 47418@debbugs.gnu.org Cc: =?UTF-8?Q?L=C3=A9o?= Le Bouter Received: via spool by 47418-submit@debbugs.gnu.org id=B47418.16167884474207 (code B ref 47418); Fri, 26 Mar 2021 19:55:02 +0000 Received: (at 47418) by debbugs.gnu.org; 26 Mar 2021 19:54:07 +0000 Received: from localhost ([127.0.0.1]:42547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPsX0-00015l-Q3 for submit@debbugs.gnu.org; Fri, 26 Mar 2021 15:54:07 -0400 Received: from mail.zaclys.net ([178.33.93.72]:48219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPsWz-000157-FD for 47418@debbugs.gnu.org; Fri, 26 Mar 2021 15:54:06 -0400 Received: from localhost.localdomain (82-64-145-38.subs.proxad.net [82.64.145.38]) (authenticated bits=0) by mail.zaclys.net (8.14.7/8.14.7) with ESMTP id 12QJrxXw006639 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 26 Mar 2021 20:53:59 +0100 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.zaclys.net 12QJrxXw006639 Authentication-Results: mail.zaclys.net; spf=fail smtp.mailfrom=lle-bout@zaclys.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaclys.net; s=default; t=1616788439; bh=7I1IqOuV+ST7KEqatiOO2sftqY6rRrFNu4l+mDOaS8Y=; h=From:To:Cc:Subject:Date:From; b=VAn5qBO1O9YA0tX4xj9v7mLbxQGEgaouJYUC/DmuHL7kBO0CqTr7W4RFDCL6QgbuM FKTsNo9IWDzZFh2o10SkjxXa/XoeY0ooiXJn0nJX0TNu96aVeceNzBa4XGn3tzZHlj /PVa327pEjnxA7FkGSQM86zd5Az51DwzYab/wheA= Date: Fri, 26 Mar 2021 20:53:42 +0100 Message-Id: <20210326195342.14152-1-lle-bout@zaclys.net> X-Mailer: git-send-email 2.31.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: 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" Reply-to: =?UTF-8?Q?L=C3=A9o?= Le Bouter From: =?UTF-8?Q?L=C3=A9o?= Le Bouter via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616790195; h=from:from:sender:sender:reply-to: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=7I1IqOuV+ST7KEqatiOO2sftqY6rRrFNu4l+mDOaS8Y=; b=VYoSaluySnT7T6FpLEJQyObS8S2yVkxiMPgtGg4eHbUH7UnnesOm0kJMJnMsqQrSAT5m3X iwkR/Dx+wEMQs8AlsxzGn+hjqdpGJ6vyHXiZ0s8egznGDwezie3/vSxMOniovSxN1J1c5B /Tj6sRHsfSJ2idc9ZHFjG7bOyjiuR/Hjck9GcE8GpCrvfaoHWy+bs9L7IdvF+wgUi5XKLe XIEOv9hg5D2ORJJZp8erGuQtSYyHJ36P+AX+0Kec+GHbyPC1LBgyeAgIv1LfJugjrGIfaS obNPYZ+s5GIebMkkoi1I0gWCyT9TfW6aNChbl5dIvZlS1iIPkujuVVcTPiuQEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616790195; a=rsa-sha256; cv=none; b=SGZU6K2R4qjauTTa0LUuK9vSHLD2iqjZT6XJyBGfrBYJisVMQ0BN7U3Lwjs8UmvpuF1o3i Uq42+zyN0eCkf8ZoerV3QbANES14UCByXBd9PGMupFaclAGSv7Fw6LvP1v4piI9Qng58d1 6KZbaqE+OOTNwIfGX3MM/zjkjC6Xcoa8PCAoFuQXGFYu4o/DsBRrPZo5fh9y1kjnzB9owQ Cvmm/G/sSK5NGjuWIDGMJO1OxifQ1iYiA/HwF+ZfsMUnSPTMPEc75WIXEF5Mf525v8T2q8 NYnCmQepU2uLY2jz+CBRKJNAgyQrcWI+jut7hqoO6GbemkgJvWWlLiseSCCgsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zaclys.net header.s=default header.b=VAn5qBO1; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.47 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=zaclys.net header.s=default header.b=VAn5qBO1; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 7F94819FDE X-Spam-Score: -3.47 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZHJxak/GwTWf * gnu/packages/patches/imagemagick-CVE-2020-27829.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/imagemagick.scm (imagemagick/fixed): Apply patch to existing graft. --- gnu/local.mk | 1 + gnu/packages/imagemagick.scm | 3 ++- .../patches/imagemagick-CVE-2020-27829.patch | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/imagemagick-CVE-2020-27829.patch diff --git a/gnu/local.mk b/gnu/local.mk index 40956598db..fe70238345 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1220,6 +1220,7 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/idris-disable-test.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ + %D%/packages/patches/imagemagick-CVE-2020-27829.patch \ %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index a3562f2e13..1618a28596 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -143,7 +143,8 @@ text, lines, polygons, ellipses and Bézier curves.") "6.9.12-2.tar.xz")) (sha256 (base32 - "17da5zihz58qm41y61sbvw626m5xfwr2nzszlikrvxyq1j1q7asa")))) + "17da5zihz58qm41y61sbvw626m5xfwr2nzszlikrvxyq1j1q7asa")) + (patches (search-patches "imagemagick-CVE-2020-27829.patch")))) (arguments (substitute-keyword-arguments (package-arguments imagemagick) ((#:phases phases) diff --git a/gnu/packages/patches/imagemagick-CVE-2020-27829.patch b/gnu/packages/patches/imagemagick-CVE-2020-27829.patch new file mode 100644 index 0000000000..74debdc98e --- /dev/null +++ b/gnu/packages/patches/imagemagick-CVE-2020-27829.patch @@ -0,0 +1,23 @@ +From 6ee5059cd3ac8d82714a1ab1321399b88539abf0 Mon Sep 17 00:00:00 2001 +From: Cristy +Date: Mon, 30 Nov 2020 16:27:26 +0000 +Subject: [PATCH] possible TIFF related-heap buffer overflow (alert & POC by + Hardik Shah) + +--- + coders/tiff.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/coders/tiff.c b/coders/tiff.c +index e98f927abd..1eecf17aea 100644 +--- a/coders/tiff.c ++++ b/coders/tiff.c +@@ -1975,7 +1975,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, + extent+=image->columns*sizeof(uint32); + #endif + strip_pixels=(unsigned char *) AcquireQuantumMemory(extent, +- sizeof(*strip_pixels)); ++ 2*sizeof(*strip_pixels)); + if (strip_pixels == (unsigned char *) NULL) + ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed"); + (void) memset(strip_pixels,0,extent*sizeof(*strip_pixels)); -- 2.31.0