Skip to content

schannel: cap the maximum allowed size for loading cert - #19964

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/schannel-cert-size
Closed

schannel: cap the maximum allowed size for loading cert#19964
bagder wants to merge 1 commit into
masterfrom
bagder/schannel-cert-size

Conversation

@bagder

@bagder bagder commented Dec 13, 2025

Copy link
Copy Markdown
Member

To avoid problems with mistakes or abuse, cap the largest allowed certificate size to load to CURL_MAX_INPUT_LENGTH bytes (8MB).

To avoid problems with mistakes or abuse, cap the largest allowed
certificate size to load to CURL_MAX_INPUT_LENGTH bytes (8MB).
@bagder bagder added TLS Windows Windows-specific labels Dec 13, 2025
@bagder
bagder marked this pull request as ready for review December 13, 2025 23:15
@bagder
bagder requested a review from Copilot December 13, 2025 23:15
@bagder

bagder commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Comment augment review to trigger a new review at any time.

Comment thread lib/vtls/schannel.c

Copilot AI left a comment

Copy link
Copy Markdown

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 a security enhancement to cap the maximum allowed certificate file size when loading client certificates in the schannel SSL/TLS backend. The change prevents potential issues from mistakes or abuse by limiting certificate files to CURL_MAX_INPUT_LENGTH (8MB).

Key changes:

  • Added size validation check before allocating memory for certificate data from files
  • Aligns schannel file-based certificate loading with existing protections for certificate blobs

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

Comment thread lib/vtls/schannel.c
@bagder bagder closed this in 1c8c34c Dec 13, 2025
@bagder
bagder deleted the bagder/schannel-cert-size branch December 13, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants