Archive Utility fails to extract zero byte encrypted content

Originator:aone.jga
Number:rdar://50532331 Date Originated:May 7 2019, 10:32 AM
Status:Open Resolved:
Product:macOS + SDK Product Version:
Classification: Reproducible:Always
 
Area:
Something not on this list

Summary:
An encrypted ZIP 2.0 file containing at least one 0 byte file will fail to extract using the bundled Archive Utility.app. It seems like the bundled extractor gets a 0 byte output and thinks the password is incorrect, so it asks the password again in a loop.

Used Keka to create the test encrypted file, although tested too with WinZIP and BetterZIP. Those, Info-ZIP (unzip in the Terminal) and The Unarchiver extract the file properly.

You can recreate the test file, simply add a 0 byte file (touch void.txt) and encrypt it with Keka, WinZIP, BetterZIP or similar. Compressing it with Info-ZIP (test_infozip.zip) will not trigger the issue since it uses the obsolete ZIP 1.0 and this seems to fail only with 2.0 version.

Steps to Reproduce:
1. Open the attached file "test.zip" with Archive Utility.app
2. Archive Utility.app will ask for the file's password
3. Type in the password (test) and hit ok

Expected Results:
The file should extract properly, given the correct password

Actual Results:
Archive Utility.app will ask the password again for the zero byte file "void.txt". It will not accept the correct password (test) or any other.

Version/Build:
Tested from Mac OS X 10.9 Archive Utility 10.9.1 (71.3) to macOS 10.14 Archive Utility 10.11 (101).

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!