Skip to content

Conversation

@bigbrett
Copy link
Contributor

Adds missing input sanitization for various request handlers

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

This PR adds input sanitization to various cryptographic request handlers to prevent buffer overflows and other security issues. The changes validate that request sizes are sufficient before processing and ensure that variable-length fields fit within the provided input buffers.

Key changes:

  • Added minimum size validation checks before processing requests across multiple handler functions
  • Added validation for variable-length fields to ensure they fit within input buffers
  • Added validation for lastBlockLen in SHA224, SHA384, and SHA512 handlers
  • Removed unused (void)inSize; statements that are no longer needed

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/wh_server_crypto.c Added input size validation to RSA, ECC, AES, CMAC, SHA, and HKDF/CMAC-KDF handlers to prevent buffer overflows
src/wh_server_cert.c Added input size validation to certificate addition handler to ensure certificate data fits within request buffer

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

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


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

Copy link
Contributor

@billphipps billphipps left a comment

Choose a reason for hiding this comment

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

lgtm!

@billphipps billphipps merged commit 6436b5c into wolfSSL:main Nov 11, 2025
15 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.

2 participants