From patchwork Sat Apr 11 13:36:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Zwing?= X-Patchwork-Id: 1269339 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=dawncrow.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dawncrow.de header.i=@dawncrow.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=r/QqpmpZ; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48zwzt3Grwz9sSt for ; Sat, 11 Apr 2020 23:42:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id ABA9087D9D; Sat, 11 Apr 2020 13:42:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vNUMZb6+yheY; Sat, 11 Apr 2020 13:42:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6BE1887A52; Sat, 11 Apr 2020 13:42:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2F2351BF34D for ; Sat, 11 Apr 2020 13:42:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2C00286DF3 for ; Sat, 11 Apr 2020 13:42:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3wJbQTZe3Ac3 for ; Sat, 11 Apr 2020 13:42:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.23]) by whitealder.osuosl.org (Postfix) with ESMTPS id AC06C86DC1 for ; Sat, 11 Apr 2020 13:42:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1586612542; s=strato-dkim-0002; d=dawncrow.de; h=Message-Id:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=0W4xnzmzyUgoawslmmW8G9bkaSBOBAg+hHr7KCJZkWE=; b=r/QqpmpZOc/7sIrr0GMWq6STRumdNJ1Rclzh7Wi8k6MfnK642agxqkLOSh3HAvsspm 4hzNfusorYe3yu9aOOKoB2qtEMhK9uEnsgvLf400OFJqHGCIZeaUPcLrxGb+Tf+xiJPN X/OKMuIjVmiCPi4e1oLBv/LktT/XDNcqe/VF2Dnn6lDroMsKkDkNIxmbe46m64VifM0U U33vpRKBAi/KaSGHEQHVoCj+gmiFWGxc5rA/BetbYZeSYbo3942baun4YrS+MDmeXl3V mxAQbYI4BzuV0S8D4hzAQwFqQICegRzl5S0suNwTSsExsI2YG/iMyEE1BWVzfdtFiy/o SePg== X-RZG-AUTH: ":ImkWY2CseuihIZy6ZWWciR6unPhpN+aXzZGGjY6ptdusOaLnXzn3ovD/FrlcNw==" X-RZG-CLASS-ID: mo00 Received: from tesla.fritz.box by smtp.strato.de (RZmta 46.2.1 DYNA|AUTH) with ESMTPSA id a09a24w3BDaJ83A (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sat, 11 Apr 2020 15:36:19 +0200 (CEST) From: =?utf-8?q?Andr=C3=A9_Hentschel?= To: buildroot@buildroot.org Date: Sat, 11 Apr 2020 15:36:14 +0200 Message-Id: <20200411133616.31897-1-nerv@dawncrow.de> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] package/p7zip: fix CVE-2016-9296 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: André Hentschel --- package/p7zip/0001-CVE-2016-9296.patch | 25 +++++++++++++++++++++++++ package/p7zip/p7zip.mk | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 package/p7zip/0001-CVE-2016-9296.patch diff --git a/package/p7zip/0001-CVE-2016-9296.patch b/package/p7zip/0001-CVE-2016-9296.patch new file mode 100644 index 0000000000..6e6fc9f58f --- /dev/null +++ b/package/p7zip/0001-CVE-2016-9296.patch @@ -0,0 +1,25 @@ +From: Robert Luberda +Date: Sat, 19 Nov 2016 08:48:08 +0100 +Subject: Fix nullptr dereference (CVE-2016-9296) + +Patch taken from https://sourceforge.net/p/p7zip/bugs/185/ + +Signed-off-by: André Hentschel +--- + CPP/7zip/Archive/7z/7zIn.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CPP/7zip/Archive/7z/7zIn.cpp b/CPP/7zip/Archive/7z/7zIn.cpp +index b0c6b98..7c6dde2 100644 +--- a/CPP/7zip/Archive/7z/7zIn.cpp ++++ b/CPP/7zip/Archive/7z/7zIn.cpp +@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams( + if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i]) + ThrowIncorrect(); + } +- HeadersSize += folders.PackPositions[folders.NumPackStreams]; ++ if (folders.PackPositions) ++ HeadersSize += folders.PackPositions[folders.NumPackStreams]; + return S_OK; + } + diff --git a/package/p7zip/p7zip.mk b/package/p7zip/p7zip.mk index ff0dd01e02..66d3198c17 100644 --- a/package/p7zip/p7zip.mk +++ b/package/p7zip/p7zip.mk @@ -10,6 +10,9 @@ P7ZIP_SITE = http://downloads.sourceforge.net/project/p7zip/p7zip/$(P7ZIP_VERSIO P7ZIP_LICENSE = LGPL-2.1+ with unRAR restriction P7ZIP_LICENSE_FILES = DOC/License.txt +# 0001-CVE-2016-9296.patch +P7ZIP_IGNORE_CVES += CVE-2016-9296 + # p7zip buildsystem is a mess: it plays dirty tricks with CFLAGS and # CXXFLAGS, so we can't pass them. Instead, it accepts ALLFLAGS_C # and ALLFLAGS_CPP as variables to pass the CFLAGS and CXXFLAGS.