Repository navigation
fix(go): add bounds checking to DeserializeStreams for payloads > 64KB - #3165
Merged
hubcio merged 2 commits intoMay 18, 2026
Merged
Conversation
atharvalade
force-pushed
the
fix/go-sdk-deserialize-streams-64kb
branch
from
April 24, 2026 15:53
10dedb2 to
18ae55f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3165 +/- ##
============================================
- Coverage 73.78% 73.78% -0.01%
Complexity 943 943
============================================
Files 1200 1200
Lines 109094 109106 +12
Branches 85996 85994 -2
============================================
+ Hits 80499 80502 +3
- Misses 25859 25867 +8
- Partials 2736 2737 +1
🚀 New features to boost your workflow:
|
atharvalade
force-pushed
the
fix/go-sdk-deserialize-streams-64kb
branch
from
April 24, 2026 17:06
18ae55f to
e40eac9
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR. Thank you for your contribution! |
Contributor
|
/ready |
slbotbm
reviewed
May 14, 2026
slbotbm
left a comment
Contributor
There was a problem hiding this comment.
one comment, otherwise lgtm
Contributor
|
@slbotbm use /author after you are done with review :) /author |
atharvalade
force-pushed
the
fix/go-sdk-deserialize-streams-64kb
branch
from
May 17, 2026 06:59
2ca3da2 to
91e6df0
Compare
Contributor
Author
|
/ready |
hubcio
approved these changes
May 18, 2026
mmodzelewski
approved these changes
May 18, 2026
numinnex
approved these changes
May 18, 2026
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.
Which issue does this PR close?
Closes #3130
Rationale
DeserializeStreamsandDeserializeToStreamhad zero bounds checking and no error propagation, causing silent data corruption for stream lists larger than 64KB.What changed?
DeserializeToStreamperformed raw slice accesses without validating that the payload contained enough bytes for the 33-byte fixed header or the variable-length name. With large payloads (>64KB), any framing misalignment caused position drift—subsequent streams were deserialized from wrong offsets, silently returning corrupted data with no error.The fix adds bounds validation before every access in
DeserializeToStream(returns error on insufficient data), propagates errors throughDeserializeStreams, and updates the TCP caller. A new test file covers single-stream, multi-stream, truncated header/name, corrupted payload, max-length name, and a 70KB+ regression test that verifies every field of ~1000 streams.Local Execution
AI Usage