Bug 1537043 (CVE-2018-1000035)

Summary: CVE-2018-1000035 unzip: Heap-based buffer overflow in fileio.c:UzpPassword function allows code execution
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: branto, jamartis, kdudka, pstodulk, security-response-team, vvitek
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: unzip 6.1c23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:37:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1537044, 1543337    
Bug Blocks: 1537057    

Description Adam Mariš 2018-01-22 10:33:50 UTC
Heap-based buffer overflow vulnerability in UzpPassword function was found, possibly allowing arbitrary code execution when uncompressing specially crafted password protected ZIP archives.

Vulnerable code:

[1591]  if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) {
[1592]          sprintf(prompt, LoadFarString(PasswPrompt),
[1593]                                  FnFilter1(zfn), FnFilter2(efn));
[1595]  } 

The buffer can be overrun since the attacker can arbitrarily choose name for files residing inside archive file.

Comment 4 Adam Mariš 2018-01-22 12:48:01 UTC

Name: R. Freingruber (SEC Consult Vulnerability Lab)

Comment 5 Pedro Yóssis Silva Barbosa 2018-01-25 15:46:47 UTC

This issue affects the versions of unzip as shipped with Red Hat Enterprise Linux 5, 6 and 7. Red Hat Product Security has rated this issue as having Low security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 7 Adam Mariš 2018-02-08 09:45:03 UTC
Created unzip tracking bugs for this issue:

Affects: fedora-all [bug 1543337]