Skip to content

check that crc is zero for ae-2 winzip aes entries - #599

Merged
0-wiz-0 merged 2 commits into
nih-at:mainfrom
arshsmith1:ae2-crc-check
Nov 30, 2026
Merged

0-wiz-0 merged 2 commits into
nih-at:mainfrom
arshsmith1:ae2-crc-check

Conversation

@arshsmith1

Copy link
Copy Markdown
Contributor

_zip_dirent_process_winzip_aes only marks the CRC as invalid for AE-2 (WinZip AES version 2) entries and left a TODO to verify that the stored CRC is zero when checking consistency. AE-2 requires a zero CRC (appnote.txt J.2), so an archive whose AE-2 entry carries the same non-zero CRC in its local and central headers currently opens without complaint even under ZIP_CHECKCONS. This threads check_consistency into the helper and rejects a non-zero CRC for AE-2 with a dedicated inconsistency detail, leaving non-strict opens and valid AE-1/AE-2 archives untouched. The added regress test opens such a crafted AE-256 archive with -c and expects the new error.

@dillof dillof added the feature For issues, use type instead. label Sep 30, 2026
@dillof dillof added this to the later milestone Sep 30, 2026
@0-wiz-0
0-wiz-0 merged commit e6cb80c into nih-at:main Nov 30, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature For issues, use type instead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants