Skip to content

Fix authTagSz validation#10175

Open
yosuke-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_2205
Open

Fix authTagSz validation#10175
yosuke-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_2205

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown

@yosuke-wolfssl yosuke-wolfssl commented Apr 9, 2026

Description

wc_AesGcmDecryptFinal() checks authTagSz == 0 to reject zero-length tags, but does not enforce authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ (default 12). Every other GCM API surface enforces this minimum: wc_AesGcmEncrypt (line 10056), wc_AesGcmDecrypt (line 10786), and wc_AesGcmEncryptFinal (line 12477) all check authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ.

Changes

This PR fixes the validation of authTagSz as like other GCM APIs.

Testing

./configure --enable-all

@yosuke-wolfssl yosuke-wolfssl self-assigned this Apr 9, 2026
Copilot AI review requested due to automatic review settings April 9, 2026 08:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Aligns wc_AesGcmDecryptFinal() authentication tag size validation with other GCM APIs by enforcing WOLFSSL_MIN_AUTH_TAG_SZ (default 12) instead of only rejecting zero-length tags.

Changes:

  • Tighten authTagSz validation in wc_AesGcmDecryptFinal() to reject tags smaller than WOLFSSL_MIN_AUTH_TAG_SZ.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yosuke-wolfssl
Copy link
Copy Markdown
Author

Please re-run the failed test

@yosuke-wolfssl
Copy link
Copy Markdown
Author

Please retry the failed test

@ColtonWilley
Copy link
Copy Markdown
Contributor

ColtonWilley commented Apr 10, 2026

Jenkins retest this please

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