Skip to content

fix: cleanup plaintext on gcmsiv/aessiv tag mismatch#70

Merged
paulmillr merged 3 commits intopaulmillr:mainfrom
deepview-autofix:deepview/425950af41
Apr 16, 2026
Merged

fix: cleanup plaintext on gcmsiv/aessiv tag mismatch#70
paulmillr merged 3 commits intopaulmillr:mainfrom
deepview-autofix:deepview/425950af41

Conversation

@deepview-autofix
Copy link
Copy Markdown
Contributor

GCM-SIV decrypt did not zero the tentative plaintext buffer on tag verification failure, leaving unauthenticated data observable through heap inspection. AES-SIV decrypt had the same issue with its decrypted plaintext p. Both now call clean() on the plaintext before throwing.

GCM-SIV decrypt did not zero the tentative plaintext buffer on tag
verification failure, leaving unauthenticated data observable through
heap inspection. AES-SIV decrypt had the same issue with its decrypted
plaintext `p`. Both now call clean() on the plaintext before throwing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: DeepView Autofix <276251120+deepview-autofix@users.noreply.github.com>
Co-Authored-By: Nikita Skovoroda <chalkerx@gmail.com>
Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>
Comment thread test/siv.test.ts Outdated
Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com>
Comment thread test/aes.test.ts Outdated
@paulmillr paulmillr merged commit dc6c775 into paulmillr:main Apr 16, 2026
6 checks passed
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.

3 participants