Bug 1377926 (CVE-2016-8687)

Summary: CVE-2016-8687 libarchive: stack based buffer overflow in bsdtar_expand_char (util.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, ndevos, praiskup, slawomir, trepik, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20160915,reported=20160915,source=oss-security,cvss2=1.9/AV:L/AC:M/Au:N/C:N/I:N/A:P,cvss3=3.3/CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L,cwe=CWE-131->CWE-121,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:20:52 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, 1378666, 1385674, 1385675    
Bug Blocks: 1376684, 1385672    

Description Doran Moppert 2016-09-21 03:33:17 UTC
Miscalculations in the safe_fprintf() function meant that the 
buffer allocated for decoding could be overflowed by crafted 
Unicode filenames.

Disclosed on oss-security:


Upstream issue:


Upstream fix:


Comment 1 Doran Moppert 2016-09-22 03:58:40 UTC
This only affects the bsdtar utility, libraries and applications linked against libarchive are not affected by this flaw.

Compiling with -fstack-protector-strong (as is the case in RHEL & Fedora) mitigates any code execution vector here.  In any case, the overflowed bytes are limited to ASCII octal escapes so even without these protections an attacker would need to be incredibly lucky to achieve more than a crash.

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

Affects: fedora-all [bug 1378666]

Comment 3 Doran Moppert 2016-09-23 03:18:27 UTC

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:30:54 UTC
*** Bug 1385659 has been marked as a duplicate of this bug. ***