You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Guian Gumpac (Jira)" <ji...@apache.org> on 2026/08/11 18:19:00 UTC

[jira] [Closed] (TINKERPOP-3280) GraphBinary deserializer unbounded pre-allocation from length prefixes

     [ https://issues.apache.org/jira/browse/TINKERPOP-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guian Gumpac closed TINKERPOP-3280.
-----------------------------------
    Resolution: Duplicate

> GraphBinary deserializer unbounded pre-allocation from length prefixes
> ----------------------------------------------------------------------
>
>                 Key: TINKERPOP-3280
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3280
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 4.0.0, 3.7.7, 3.8.2
>            Reporter: Guian Gumpac
>            Priority: Major
>
> GraphBinary value types size a heap allocation (or bound a read loop) from a
> 4-byte length/count prefix before the payload is read or checked against the
> bytes actually remaining. Because GraphBinary is deserialized pre-authentication
> on the default wire path, a tiny malformed frame (~6-21 bytes) can declare a
> multi-hundred-megabyte to multi-gigabyte allocation and drive Gremlin Server to
> OutOfMemoryError. maxContentLength bounds the frame, not a single declared
> length, and the binary decoder catches only SerializationException, so the OOM
> escapes. The surface is symmetric: a malicious or on-path server can OOM a
> connecting driver the same way. The same shape recurs across String, Collection
> (list/set), Map, BigInteger, InetAddress, ByteBuffer, Bytecode, P, Tree, graph
> and BulkSet.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)