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.
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.
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.
Created attachment 969625 [details]
Created using the instructions from the original report as quoted in comment 0.
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.
Created attachment 990005 [details]
This is upstream patch which is part of last devel version. There are aesthetic (more readable) changes.
This issue can be triggered in both test (unzip -t) and extraction mode.
Created unzip tracking bugs for this issue:
Affects: fedora-all [bug 1191118]
Comment on attachment 990005 [details]
I apologize, that was for bug #1174844.
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.
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.
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.
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