Bug 902998 (CVE-2013-0211)

Summary: CVE-2013-0211 libarchive: read buffer overflow on 64-bit systems
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: security-response-team, tsmetana
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20130325,reported=20130120,source=distros,cvss2=2.1/AV:L/AC:L/Au:N/C:N/I:N/A:P,rhel-6/libarchive=defer,fedora-all/libarchive=affected,epel-5/libarchive=affected,fedora-all/mingw-libarchive=affected
Fixed In Version: libarchive 3.2.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 927105, 927106, 927115    
Bug Blocks: 903001    
Attachments:
Description Flags
proposed upstream patch none

Description Vincent Danen 2013-01-22 17:03:23 EST
Fabian Yamaguchi reported a read buffer overflow flaw in libarchive on 64-bit systems where sizeof(size_t) is equal to 8.  In the archive_write_zip_data() function in libarchive/archive_write_set_format_zip.c, the "s" parameter is of type size_t (64 bit, unsigned) and is cast to a 64 bit signed integer.  If "s" is larger than MAX_INT, it will not be set to "zip->remaining_data_bytes" even though it is larger than "zip->remaining_data_bytes", which leads to a buffer overflow when calling deflate().

This can lead to a segfault in an application that uses libarchive to create ZIP archives.
Comment 1 Vincent Danen 2013-01-22 17:05:51 EST
Created attachment 685479 [details]
proposed upstream patch
Comment 2 Huzaifa S. Sidhpurwala 2013-03-25 01:17:55 EDT
This issue is now public via:

https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
Comment 3 Huzaifa S. Sidhpurwala 2013-03-25 01:19:36 EDT
Created mingw-libarchive tracking bugs for this issue

Affects: fedora-all [bug 927106]
Comment 4 Huzaifa S. Sidhpurwala 2013-03-25 01:19:42 EDT
Created libarchive tracking bugs for this issue

Affects: fedora-all [bug 927105]
Comment 5 Huzaifa S. Sidhpurwala 2013-03-25 01:47:04 EDT
Created libarchive tracking bugs for this issue

Affects: epel-5 [bug 927115]
Comment 7 Huzaifa S. Sidhpurwala 2013-03-25 01:53:38 EDT
Statement:

This issue affects the version of libarchive as shipped with Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this issue as having low
security impact, a future update may address this flaw.
Comment 10 Fedora Update System 2013-04-07 20:22:12 EDT
mingw-libarchive-3.0.4-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2013-04-07 20:26:11 EDT
mingw-libarchive-3.0.4-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2013-04-12 18:24:57 EDT
libarchive-3.0.4-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2013-04-12 18:27:16 EDT
libarchive-3.0.4-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2013-05-02 15:51:21 EDT
libarchive-2.8.4-6.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.