TINKERPOP-3281 Reject malformed GraphBinary length prefixes - #3610
Open
GumpacG wants to merge 1 commit into
Open
TINKERPOP-3281 Reject malformed GraphBinary length prefixes#3610GumpacG wants to merge 1 commit into
GumpacG wants to merge 1 commit into
Conversation
Assisted-by: Kiro: Claude Opus 4.8
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 3.7-dev #3610 +/- ##
=============================================
+ Coverage 75.49% 75.52% +0.02%
- Complexity 13161 13189 +28
=============================================
Files 1092 1093 +1
Lines 67208 67286 +78
Branches 7391 7403 +12
=============================================
+ Hits 50742 50816 +74
- Misses 13837 13846 +9
+ Partials 2629 2624 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kenhuuu
reviewed
Aug 6, 2026
| */ | ||
| protected static int readSizePrefix(final Buffer buffer) throws IOException { | ||
| if (buffer.readableBytes() < Integer.BYTES) | ||
| throw new IOException(String.format( |
Contributor
There was a problem hiding this comment.
We should probably throw SerializationException from serializers as that is already a type of IOException
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.
GraphBinary sized heap allocations from an unvalidated 4-byte length prefix before reading the payload, so a tiny
pre-auth frame (~6-21 bytes) could demand gigabytes and OOM Gremlin Server or a connecting driver.
What changed
reject negative or oversized with
IOException.BulkSetbulk values.String,ByteBuffer,BigInteger,InetAddress, list, set, map,Tree,BulkSet,Bytecode,Pand graph. Well-formed messages are unaffected.
Testing
GraphBinaryLengthPrefixTest(rejection + large round-trip cases); full GraphBinary compatibility suite green.See: https://issues.apache.org/jira/browse/TINKERPOP-3281
Assisted-by: Kiro: Claude Opus 4.8