Bug 1174856 (CVE-2014-8141) - CVE-2014-8141 unzip: getZip64Data() out-of-bounds read issues (oCERT-2014-011)
Summary: CVE-2014-8141 unzip: getZip64Data() out-of-bounds read issues (oCERT-2014-011)
Alias: CVE-2014-8141
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact: Frantisek Sumsal
Depends On: 1191118 1196128 1196129 1196130 1196131
Blocks: 1174865
TreeView+ depends on / blocked
Reported: 2014-12-16 15:46 UTC by Tomas Hoger
Modified: 2023-05-12 06:38 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A buffer overflow flaw was found in the way unzip handled Zip64 files. A specially crafted Zip archive could possibly cause unzip to crash when the archive was uncompressed.
Clone Of:
Last Closed: 2015-03-18 21:11:12 UTC

Attachments (Terms of Use)
Upstream patch (4.94 KB, patch)
2014-12-16 15:57 UTC, Tomas Hoger
no flags Details | Diff
upstream patch (3.24 KB, patch)
2015-02-10 09:28 UTC, Petr Stodulka
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1360443 0 None None None Never
Red Hat Product Errata RHSA-2015:0700 0 normal SHIPPED_LIVE Moderate: unzip security update 2015-03-18 22:58:14 UTC

Description Tomas Hoger 2014-12-16 15:46:35 UTC
oCERT reports an unzip flaw discovered by Michele Spagnuolo, Google Security Team:

The read errors show problems in process.c:getZip64Data(), which lacked any error detection or reporting, and was trying to extract multi-byte data from a buffer which did not contain enough bytes.

Proposed changes:

fileio.c:do_string() looks at the status value returned from process.c:getZip64Data(), and puts out a new warning.
process.c:getZip64Data() gets new validity tests, and it returns a useful status value.


Red Hat would like to thank oCERT for reporting these issues. oCERT acknowledges Michele Spagnuolo of the Google Security Team as the original reporter.

Comment 2 Tomas Hoger 2014-12-16 15:57:05 UTC
Created attachment 969625 [details]
Upstream patch

Created using the instructions from the original report as quoted in comment 0.

Comment 6 Huzaifa S. Sidhpurwala 2014-12-22 15:49:59 UTC
External Reference:


Comment 10 Tomas Hoger 2015-02-09 20:20:45 UTC
This issue only affects UnZip version 6.0, which is the version that introduced Zip64 support.  Older versions, such as unzip 5.52 as shipped with Red Hat Enterprise Linux 5, do not contain affected code.

This is a heap-base buffer over-read issue.  Over-read is limited to 28 bytes, hence it's unlikely to lead to crash for normal builds.

Comment 11 Petr Stodulka 2015-02-10 09:28:04 UTC
Created attachment 990005 [details]
upstream patch

This is upstream patch which is part of last devel version. There are aesthetic (more readable) changes.

Comment 12 Tomas Hoger 2015-02-10 13:20:26 UTC
This issue can be triggered in both test (unzip -t) and extraction mode.

Comment 13 Tomas Hoger 2015-02-10 13:37:23 UTC
Created unzip tracking bugs for this issue:

Affects: fedora-all [bug 1191118]

Comment 14 Petr Stodulka 2015-02-10 15:47:28 UTC
Comment on attachment 990005 [details]
upstream patch

I apologize, that was for  bug #1174844.

Comment 15 Fedora Update System 2015-02-16 03:25:48 UTC
unzip-6.0-20.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2015-02-23 23:25:21 UTC
unzip-6.0-17.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Vasyl Kaigorodov 2015-03-12 15:00:07 UTC

This issue did not affect the versions of unzip as shipped with Red Hat Enterprise Linux 5 as they did not include support for Zip64.

Comment 20 errata-xmlrpc 2015-03-18 18:59:16 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2015:0700 https://rhn.redhat.com/errata/RHSA-2015-0700.html

Note You need to log in before you can comment on or make changes to this bug.