Repository navigation
Reserve alignment slack in SSLBuffer max capacity - #3642
Open
samuel40791765 wants to merge 1 commit into
Open
samuel40791765 wants to merge 1 commit into
samuel40791765 wants to merge 1 commit into
Conversation
aws#2673 raised SSLBUFFER_MAX_CAPACITY to INT_MAX, but SSLBuffer places data at an alignment offset of up to SSL3_ALIGN_PAYLOAD - 1 bytes and tracks offset_/cap_ as int. With read ahead and a maximally sized read buffer, consuming the whole buffer could push offset_ past INT_MAX. This caps the buffer at INT_MAX - (SSL3_ALIGN_PAYLOAD - 1) so offset_ + cap_ always fits in an int, and updates the stale 0xffff comments and docs.
samuel40791765
requested review from
WillChilds-Klein,
prasden and
skmcgrail
and removed request for
prasden
October 9, 2026 20:15
WillChilds-Klein
approved these changes
Oct 9, 2026
skmcgrail
approved these changes
Oct 9, 2026
skmcgrail
approved these changes
Oct 9, 2026
Contributor
|
🔒 Security Review — View Report Please review before merging. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3642 +/- ##
==========================================
+ Coverage 78.69% 78.72% +0.02%
==========================================
Files 705 705
Lines 130689 130689
Branches 17919 17919
==========================================
+ Hits 102850 102880 +30
+ Misses 26860 26828 -32
- Partials 979 981 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
msys clang CI failures fixed with this PR: #3645 |
samuel40791765
enabled auto-merge (squash)
October 11, 2026 00:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
#2673 raised
SSLBUFFER_MAX_CAPACITYtoINT_MAX, butSSLBufferplaces data at an alignment offset of up toSSL3_ALIGN_PAYLOAD - 1bytes and tracksoffset_/cap_asint. With read ahead and a maximally sized read buffer, consuming the whole buffer could pushoffset_pastINT_MAX.This caps the buffer at
INT_MAX - (SSL3_ALIGN_PAYLOAD - 1)sooffset_ + cap_always fits in anint. There were also some stale comments after #2673 raised the limit, so this fixes that as well.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.