All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/16] unzip: fix symlink problem
Date: Fri, 27 Jul 2018 16:32:41 +0100	[thread overview]
Message-ID: <20180727153248.22838-9-ross.burton@intel.com> (raw)
In-Reply-To: <20180727153248.22838-1-ross.burton@intel.com>

Large zip files can cause unzip to crash, take a patch from Fedora to fix it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-extended/unzip/unzip/symlink.patch | 26 +++++++++++++++++++++++++
 meta/recipes-extended/unzip/unzip_6.0.bb        |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta/recipes-extended/unzip/unzip/symlink.patch

diff --git a/meta/recipes-extended/unzip/unzip/symlink.patch b/meta/recipes-extended/unzip/unzip/symlink.patch
new file mode 100644
index 00000000000..a38f6f16123
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/symlink.patch
@@ -0,0 +1,26 @@
+Unzip doesn't handle large zip files well and crashes:
+
+"This only happens if you have more then 16k entries and when one of
+the 16k entry infos is reused it happend to be previously used for
+a symlink entry."
+
+This patch is taken from Fedora (https://bugzilla.redhat.com/show_bug.cgi?id=972427)
+
+Upstream-Status: Pending (upstream is dead)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- unzip60/process.c.sav	2013-06-09 12:08:57.070392264 +0200
++++ unzip60/process.c	2013-06-09 12:10:08.641696988 +0200
+@@ -1751,6 +1751,12 @@
+         = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11);
+ #endif
+ 
++#ifdef SYMLINKS
++    /* Initialize the symlink flag, may be set by the platform-specific
++       mapattr function.  */
++    G.pInfo->symlink = 0;
++#endif 
++
+     return PK_COOL;
+ 
+ } /* end function process_cdir_file_hdr() */
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb
index 105d048f55b..dbf4112a4c6 100644
--- a/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -19,6 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
 	file://fix-security-format.patch \
 	file://18-cve-2014-9913-unzip-buffer-overflow.patch \
 	file://19-cve-2016-9844-zipinfo-buffer-overflow.patch \
+	file://symlink.patch \
 "
 UPSTREAM_VERSION_UNKNOWN = "1"
 
-- 
2.11.0



  parent reply	other threads:[~2018-07-27 15:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 15:32 [PATCH 01/16] oeqa/sdk: add test that CMake works Ross Burton
2018-07-27 15:32 ` [PATCH 02/16] libidn2: add new version Ross Burton
2018-08-02 18:50   ` Khem Raj
2018-07-27 15:32 ` [PATCH 03/16] gnutls: fix libidn dependencies Ross Burton
2018-07-27 15:32 ` [PATCH 04/16] curl: enable libidn Ross Burton
2018-07-27 15:32 ` [PATCH 05/16] ovmf: remove ossp-util from DEPENDS Ross Burton
2018-07-27 15:32 ` [PATCH 06/16] ossp-uuid: remove Ross Burton
2018-07-27 15:32 ` [PATCH 07/16] dbus-glib: merge bb and inc Ross Burton
2018-07-27 15:32 ` [PATCH 08/16] update-rc.d: move to git.yoctoproject.org Ross Burton
2018-07-27 15:32 ` Ross Burton [this message]
2018-07-27 15:32 ` [PATCH 10/16] usbutils: upgrade to 010 Ross Burton
2018-07-27 15:32 ` [PATCH 11/16] cups: depend on libusb1 Ross Burton
2018-07-27 15:32 ` [PATCH 12/16] libusb-compat: remove Ross Burton
2018-07-27 15:32 ` [PATCH 13/16] gccmakedep: remove Ross Burton
2018-07-27 15:32 ` [PATCH 14/16] icon-naming-utils: remove Ross Burton
2018-07-27 15:32 ` [PATCH 15/16] oeqa/runtime/scanelf: remove Ross Burton
2018-07-27 15:32 ` [PATCH 16/16] pax-utils: remove Ross Burton
2018-07-27 16:01   ` Christopher Larson
2018-07-27 16:13     ` Burton, Ross
2018-07-27 17:52   ` Khem Raj
2018-07-27 17:58     ` Burton, Ross
2018-07-27 16:03 ` ✗ patchtest: failure for "oeqa/sdk: add test that CMake ..." and 15 more Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180727153248.22838-9-ross.burton@intel.com \
    --to=ross.burton@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.