cassandra/test
Francisco Guerrero 251b0e9b91 Bound declared value length against readable bytes in CBUtil
A 32-bit length field read from the wire by CBUtil.readValue (and its
siblings) flowed directly into new byte[length] with no upper bound,
allowing an unauthenticated client to drive the JVM into
OutOfMemoryError: 'Requested array size exceeds VM limit' — and, with
the default -XX:OnOutOfMemoryError=kill -9 %p, terminate the process —
by declaring Integer.MAX_VALUE as the SASL-token length in AUTH_RESPONSE.

Guard the allocation in the single private readRawBytes(ByteBuf, int)
that all int32-length readers funnel through, rejecting lengths that
exceed the buffer's readable bytes with a ProtocolException.

patch by Francisco Guerrero; reviewed by Stefan Miklosovic for CASSANDRA-21521
2026-07-27 09:51:36 -05:00
..
anttasks/org/apache/cassandra/anttasks JMH improvements - faster build and async profiler 2023-09-25 12:39:36 +02:00
bin JMH improvements - faster build and async profiler 2023-09-25 12:39:36 +02:00
burn/org/apache/cassandra Fix BTree.FastBuilder.reset() and test 2024-09-16 12:24:32 -05:00
conf Use default commitlog settings in test YAMLs 2024-08-15 10:12:39 -05:00
data Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value 2025-08-27 18:54:10 +02:00
distributed/org/apache/cassandra BTree.FastBuilder.reset() fails to clear savedBuffer and savedNextKey, causing ClassCastException and SSTable header corruption during schema disagreement 2026-06-02 10:14:26 +01:00
long/org/apache/cassandra Merge branch 'cassandra-3.11' into cassandra-4.0 2023-01-28 16:54:39 +01:00
memory/org/apache/cassandra/db/compaction Remove OrderedJUnit4ClassRunner 2021-09-20 13:37:32 +02:00
microbench/org/apache/cassandra/test/microbench JMH improvements - faster build and async profiler 2023-09-25 12:39:36 +02:00
resources Remove byteman-related files from production sources 2023-10-10 09:51:11 +02:00
unit/org Bound declared value length against readable bytes in CBUtil 2026-07-27 09:51:36 -05:00