From patchwork Thu Aug 23 02:07:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 961130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::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 41wnrh1JlKz9s0n for ; Thu, 23 Aug 2018 12:08:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vlkZNwei/x4d92gs4YQ+qeWp3k2v8l//DfKE1v9n8sc=; b=C4Kwbf7P42WpBf 5pPGGIORJj6YCT/+kny+GQq/g/c0FzI2ho7NGMb5FQkBzCxXbliJX+YxFLdWJc6enqy6/T+I6hdMG YUhdPFeim6lI0JZWvLZyFAMhfFK9BXyf+mY+vyouwwqNvJ4VPN4Sh3gkXDWXbVXAC08KNbtjsRjKA zgty/mLUQebINqL0n6R7sYYljdSPXmH8EO85ssMv4trXHU4seeoJL8hagePuvGpQfT355glFDTGe5 GYaeE5nrANSqqqLiyOXrv5PWcED2FA/tNb1QMrxOB/bDTZNEia45d7z8uGq/34XLpeCsALy0Atz1W QdhYtTPKuTxmEuKpvYSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsf2k-0005ej-81; Thu, 23 Aug 2018 02:08:14 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsf2h-0005dc-Ox for openwrt-devel@lists.openwrt.org; Thu, 23 Aug 2018 02:08:13 +0000 Received: by mail-pg1-x529.google.com with SMTP id k8-v6so1777778pgq.5 for ; Wed, 22 Aug 2018 19:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ngy1RQXB/N+5doVJw+aZCM0rZpkyTqvPtUngR+NBFCw=; b=t04HlCRY3EHpS4FDddGNgfIW+uyIRNVj7Ctk+N7c32InQRM2o3BQyY16eUaz2aDkFW putwosVM7RPpp4fMeSEFfJDL8LIFj5dB38xqS4jM6pqVc6qt9l3ctuUza345NBzTTA6a 0UNkzi07FQ5n7UU717iW5N/5fudYgxeMgMJzOb0p9O+ezLDMlyjwVjC5psWVRk8xSwkh ixEkmejBP/voUBViQpFlU6MegbfOkP2sJmlY354dIvgg/OKlWFV4GppjGr+RsiRpUJP4 4n/XCuWZBmsx+YlNYbUFaExuFUQV74ft+tUypXo/zabYud7b1E4veBwy7iLUc2vUuoxT Dmdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ngy1RQXB/N+5doVJw+aZCM0rZpkyTqvPtUngR+NBFCw=; b=pdjTQGiYhHAFTq/oGYYtNQCThxCh7/vWuna8EBbyXAzgi4LWDeLYXAa1PtoK0C5WUe 8bOR9FTrPH/oO7CL1UNql48Y0Yc3KoyOJwuGth/Pk2nNXMF9Bpw0Ba/jh8wDK67VSpMC 3JHhQpzyOYJMQHJRrtLCx5apFH0KW3WzlJpNGaYta7iqsfNV6p6Z9JO5MvJxitHDkdqI 8tiRyb/KrY4uOBkvWd/e0KGeupKjd63A8cnifxaWea6MofUOt2lhvS66wG7MbIZTG3Y5 2jXlrEOR81jWZfy2SR7AlZU0mOrOA7nLMaBdcj0j3BkguLGljaDzupiQWSFOSnaJuY8O O8YQ== X-Gm-Message-State: AOUpUlHHZ0DT0JXn0zy8tWuPduM8RmzYliMKTtevMdeuVmhqen2V0DyB juVSuhZ+fSy6j67cHJp9KIhfIvuC34c= X-Google-Smtp-Source: AA+uWPwlBE3399AySe569GLrYZRubSkb7iP7FFK3R5sJJyq173u59IgVHZDBSFjyC5KnEl8u+GFzsw== X-Received: by 2002:a63:6ce:: with SMTP id 197-v6mr26548392pgg.338.1534990079529; Wed, 22 Aug 2018 19:07:59 -0700 (PDT) Received: from DESKTOP-CEH0M93.lan (astound-69-42-1-138.ca.astound.net. [69.42.1.138]) by smtp.gmail.com with ESMTPSA id r85-v6sm4929648pfd.144.2018.08.22.19.07.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Aug 2018 19:07:58 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Date: Wed, 22 Aug 2018 19:07:56 -0700 Message-Id: <1534990077-871-1-git-send-email-rosenp@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_190811_836580_153ADDF8 X-CRM114-Status: GOOD ( 10.28 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:529 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 1/2] bzip2: Fix CVE-2016-3189 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rosen Penev MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Issue causes a crash with specially crafted bzip2 files. More info: https://nvd.nist.gov/vuln/detail/CVE-2016-3189 Taken from Fedora. Signed-off-by: Rosen Penev --- Please backport to 18.06 and/or 17.05 package/utils/bzip2/Makefile | 2 +- package/utils/bzip2/patches/010-CVE-2016-3189.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 package/utils/bzip2/patches/010-CVE-2016-3189.patch diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile index 4c8b360..ea2fc76 100644 --- a/package/utils/bzip2/Makefile +++ b/package/utils/bzip2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bzip2 PKG_VERSION:=1.0.6 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.bzip.org/$(PKG_VERSION) diff --git a/package/utils/bzip2/patches/010-CVE-2016-3189.patch b/package/utils/bzip2/patches/010-CVE-2016-3189.patch new file mode 100644 index 0000000..064f982 --- /dev/null +++ b/package/utils/bzip2/patches/010-CVE-2016-3189.patch @@ -0,0 +1,11 @@ +diff -up ./bzip2recover.c.old ./bzip2recover.c +--- ./bzip2recover.c.old 2016-03-22 08:49:38.855620000 +0100 ++++ ./bzip2recover.c 2016-03-30 10:22:27.341430099 +0200 +@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv ) + bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); + bsPutUInt32 ( bsWr, blockCRC ); + bsClose ( bsWr ); ++ outFile = NULL; + } + if (wrBlock >= rbCtr) break; + wrBlock++;