Bug 1174856 - (CVE-2014-8141) CVE-2014-8141 unzip: getZip64Data() out-of-bounds read issues (oCERT-2014-011)
CVE-2014-8141 unzip: getZip64Data() out-of-bounds read issues (oCERT-2014-011)
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
Frantisek Sumsal
impact=low,public=20141222,reported=2...
: Security
Depends On: 1191118 1196128 1196129 1196130 1196131
Blocks: 1174865
  Show dependency treegraph
 
Reported: 2014-12-16 10:46 EST by Tomas Hoger
Modified: 2015-11-25 05:28 EST (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-18 17:11:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Upstream patch (4.94 KB, patch)
2014-12-16 10:57 EST, Tomas Hoger
no flags Details | Diff
upstream patch (3.24 KB, patch)
2015-02-10 04:28 EST, pstodulk
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1360443 None None None Never
Red Hat Product Errata RHSA-2015:0700 normal SHIPPED_LIVE Moderate: unzip security update 2015-03-18 18:58:14 EDT

  None (edit)
Description Tomas Hoger 2014-12-16 10:46:35 EST
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:

http://antinode.info/ftp/info-zip/unzip60/fileio.c
fileio.c:do_string() looks at the status value returned from process.c:getZip64Data(), and puts out a new warning.
    
http://antinode.info/ftp/info-zip/unzip60/process.c
process.c:getZip64Data() gets new validity tests, and it returns a useful status value.
"""

Acknowledgement:

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 10:57:05 EST
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 10:49:59 EST
External Reference:

http://www.ocert.org/advisories/ocert-2014-011.html
Comment 10 Tomas Hoger 2015-02-09 15:20:45 EST
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 pstodulk 2015-02-10 04:28:04 EST
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 08:20:26 EST
This issue can be triggered in both test (unzip -t) and extraction mode.
Comment 13 Tomas Hoger 2015-02-10 08:37:23 EST
Created unzip tracking bugs for this issue:

Affects: fedora-all [bug 1191118]
Comment 14 pstodulk 2015-02-10 10:47:28 EST
Comment on attachment 990005 [details]
upstream patch

I apologize, that was for  bug #1174844.
Comment 15 Fedora Update System 2015-02-15 22:25:48 EST
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 18:25:21 EST
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 11:00:07 EDT
Statement:

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 14:59:16 EDT
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.