Bug 2244556 (CVE-2023-45853)

Summary: CVE-2023-45853 zlib: integer overflow and resultant heap-based buffer overflow in zipOpenNewFileInZip4_6
Product: [Other] Security Response Reporter: Marco Benatto <mbenatto>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ahughes, chazlett, csutherl, jcantril, jclere, khosford, ljavorsk, mbalao, mturk, neugens, peholase, periklis, pjindal, plodge, sraghupu, szappis
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the MiniZip component of the zlib package. When opening a new file, MiniZip doesn't properly validate the filename, comments, or extra fields length against the data type used to store this information. This may allow an attacker to craft a malicious ZIP file that will lead to an overflow on the length field. This value is further used in memory allocations and indexing, which can cause an out-of-bounds write, leading to heap corruption and possible arbitrary code execution.
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: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2244558, 2244559, 2244557    
Bug Blocks: 2244555    

Description Marco Benatto 2023-10-16 23:28:22 UTC
MiniZip in zlib through 1.3 has an integer overflow and resultant heap-based buffer overflow in zipOpenNewFileInZip4_64 via a long filename, comment, or extra field. NOTE: MiniZip is not a supported part of the zlib product.

https://www.winimage.com/zLibDll/minizip.html
https://github.com/madler/zlib/pull/843
https://chromium.googlesource.com/chromium/src/+/d709fb23806858847131027da95ef4c548813356
https://chromium.googlesource.com/chromium/src/+/de29dd6c7151d3cd37cb4cf0036800ddfb1d8b61
https://github.com/madler/zlib/blob/ac8f12c97d1afd9bafa9c710f827d40a407d3266/contrib/README.contrib#L1-L4

Comment 1 Marco Benatto 2023-10-16 23:29:16 UTC
Created mingw-zlib tracking bugs for this issue:

Affects: fedora-all [bug 2244558]


Created zlib tracking bugs for this issue:

Affects: fedora-all [bug 2244557]

Comment 2 Marco Benatto 2023-10-16 23:30:28 UTC
Created BackupPC-XS tracking bugs for this issue:

Affects: epel-all [bug 2244559]

Comment 7 Marco Benatto 2023-10-26 14:54:28 UTC
Upstream commit for this issue:
https://github.com/madler/zlib/pull/843/commits/431e66398552effd82d5c0ea982a521821782ebd

Comment 12 errata-xmlrpc 2023-12-07 13:55:47 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

Via RHSA-2023:7626 https://access.redhat.com/errata/RHSA-2023:7626