Skip to content

Reset WinZip AES HMAC state when reopening a source - #571

Merged
dillof merged 1 commit into
nih-at:mainfrom
HyunsikParker:fix/winzip-aes-hmac-reopen-20260830
Aug 30, 2026
Merged

Reset WinZip AES HMAC state when reopening a source#571
dillof merged 1 commit into
nih-at:mainfrom
HyunsikParker:fix/winzip-aes-hmac-reopen-20260830

Conversation

@HyunsikParker

Copy link
Copy Markdown
Contributor

Reset hmac_verified for every ZIP_SOURCE_OPEN cycle. Without the reset, reopening a WinZip AES source after an authentication failure skips HMAC verification on the second cycle because hmac_verify_failed is cleared while hmac_verified remains set.

The regression reuses existing AE-2 fixtures and checks that:

  • corrupted empty and non-empty HMACs fail on both open cycles;
  • a valid AES source succeeds on both open cycles.

Tests:

  • normal suite: 190 tests, 0 failed;
  • AddressSanitizer and UndefinedBehaviorSanitizer: 187 executed, 0 failed, 3 filesystem-clone tests skipped.

@dillof
dillof merged commit e1f2793 into nih-at:main Aug 30, 2026
1 check failed
@dillof

dillof commented Aug 30, 2026

Copy link
Copy Markdown
Member

Good catch, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants