Bug 1377923 (CVE-2016-8688)

Summary: CVE-2016-8688 libarchive: heap based buffer overflow in detect_form (archive_read_support_format_mtree.c)
Product: [Other] Security Response Reporter: Doran Moppert <dmoppert>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: anto.trande, besser82, fweimer, ndevos, praiskup, slawomir, trepik
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20160915,reported=20160915,source=oss-security,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:N/A:P,cvss3=4.8/CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L,cwe=CWE-131->CWE-125,rhel-6/libarchive=notaffected,rhel-7/libarchive=wontfix,fedora-all/libarchive=affected,epel-5/libarchive=affected,epel-6/libarchive3=affected
Fixed In Version: libarchive 3.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-23 03:21:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1385676, 1378669, 1385674, 1385675    
Bug Blocks: 1376684, 1385672    

Description Doran Moppert 2016-09-21 03:30:03 UTC
Bookkeeping errors when extending the read-ahead buffer when trying 
to identify an mtree archive could lead libarchive to significantly
overcalculate the size of the line being read, resulting in heap
out-of-bounds reads or a crash.

Disclosed on oss-security:

http://seclists.org/oss-sec/2016/q3/516

Upstream issue:

https://github.com/libarchive/libarchive/issues/747

Upstream fix:

https://github.com/libarchive/libarchive/commit/eec077f


All the mtree-related crashes in the oss-sec post came from the same 
underlying issue and were resolved in this commit.

Comment 1 Doran Moppert 2016-09-22 03:57:11 UTC
This could conceivably be exploited for controlled read of the heap, but code execution is not possible.

Comment 2 Doran Moppert 2016-09-23 03:17:06 UTC
Created libarchive tracking bugs for this issue:

Affects: fedora-all [bug 1378669]

Comment 3 Doran Moppert 2016-09-23 03:19:30 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 4 Doran Moppert 2016-10-18 04:31:04 UTC
*** Bug 1385664 has been marked as a duplicate of this bug. ***