Skip to content

ssl_sess: check fields in wolfSSL_d2i_SSL_SESSION.#9949

Open
philljj wants to merge 1 commit intowolfSSL:masterfrom
philljj:fix_d2i_SSL_SESSION
Open

ssl_sess: check fields in wolfSSL_d2i_SSL_SESSION.#9949
philljj wants to merge 1 commit intowolfSSL:masterfrom
philljj:fix_d2i_SSL_SESSION

Conversation

@philljj
Copy link
Contributor

@philljj philljj commented Mar 11, 2026

Description

Check idLen and similar fields in wolfSSL_d2i_SSL_SESSION.

Fixes zd#21323.

@philljj philljj self-assigned this Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 14:49
Copy link
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

Improves robustness of session deserialization in wolfSSL_d2i_SSL_SESSION by validating length fields before copying into fixed-size buffers, preventing potential buffer overflows when parsing externally provided session blobs.

Changes:

  • Add bounds check for sessionIDSz against ID_LEN before copying sessionID.
  • Add bounds check for idLen against SERVER_ID_LEN before copying serverID.
  • Add bounds check for sessionCtxSz against ID_LEN before copying sessionCtx.

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

@philljj philljj added the For This Release Release version 5.9.0 label Mar 11, 2026
@philljj philljj assigned wolfSSL-Bot and unassigned philljj Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants