cassandra/test/unit/org/apache/cassandra
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
..
audit Rate limit password changes 2026-03-16 22:02:41 +01:00
auth Fix skipped tests and flakiness in CassandraRoleManagerTest 2026-06-24 13:04:14 +02:00
batchlog Add configurable batchlog endpoint strategies 2024-10-15 13:34:40 +02:00
cache Merge branch 'cassandra-3.11' into cassandra-4.0 2021-09-02 11:09:12 +02:00
concurrent DebuggableThreadPoolExecutor does not propagate client warnings 2021-11-18 17:22:27 -08:00
config Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
cql/jdbc
cql3 Fix PasswordObfuscator failing to obfuscate certain passwords 2026-06-19 15:10:04 +02:00
db Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
dht Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting 2025-11-22 11:17:35 +00:00
diag Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
fql ninja-fix FullQueryLoggerTest, requires allow_nodetool_archive_command false to begin with CASSANDRA-18550 2023-05-26 15:44:28 +02:00
gms Gossip doesn't converge due to race condition when updating EndpointStates multiple fields 2025-05-22 14:12:15 -07:00
hints Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-20 10:29:09 +01:00
index Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
io Enhance CQLSSTableWriter to notify client on sstable production 2024-11-22 14:49:22 -08:00
locator Safer handling of out-of-range tokens 2024-09-17 17:04:11 -05:00
metrics Dropwizard Meter causes timeouts when infrequently used 2025-04-08 15:16:08 -04:00
net Fix memory leak in BufferPoolAllocator when a capacity needs to be extended 2025-11-14 17:11:25 +00:00
repair Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting 2025-11-22 11:17:35 +00:00
schema Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
security Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
serializers Fix timestamp tz parsing 2022-03-23 09:21:38 -05:00
service Safer handling of out-of-range tokens 2024-09-17 17:04:11 -05:00
streaming Safer handling of out-of-range tokens 2024-09-17 17:04:11 -05:00
tools Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value 2025-08-27 18:54:10 +02:00
tracing Allow storage port to be configurable per node 2018-01-25 14:32:24 -05:00
transport Bound declared value length against readable bytes in CBUtil 2026-07-27 09:51:36 -05:00
triggers Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
utils Verify extension type before initializing reflectively-loaded classes 2026-07-20 20:03:45 +02:00
AbstractSerializationsTester.java Add repair streaming preview 2017-04-24 09:21:33 -07:00
CassandraBriefJUnitResultFormatter.java
CassandraIsolatedJunit4ClassRunner.java Merge branch 'cassandra-3.11' into cassandra-4.0 2021-05-18 06:40:52 +02:00
CassandraXMLJUnitResultFormatter.java Merge branch 'cassandra-2.2' into cassandra-3.0 2020-08-04 10:45:03 +02:00
ConsoleAppender.java
JStackJUnitTask.java Add JStackJUnitTask to avoid downloading the jar 2021-07-25 11:37:32 -05:00
LogbackStatusListener.java Merge branch 'cassandra-2.2' into cassandra-3.0 2020-03-27 19:04:38 +01:00
MethodComparator.java
RepeatableRunner.java patch by Berenguer Blasi; reviewed by Andrés de la Peña for CASSANDRA-16654 2021-05-18 06:36:49 +02:00
SchemaLoader.java Fix compression test runs 2021-04-28 10:43:46 +02:00
ServerTestUtils.java Correct memtable on-heap size calculations to match actual use (CASSANDRA-16318) 2021-01-19 14:08:20 -05:00
TeeingAppender.java Fix TeeingAppender causing some logs to be truncated/empty 2015-10-14 16:48:52 +01:00
UpdateBuilder.java Make TableMetadata immutable, optimize Schema 2017-01-27 22:17:46 +00:00
Util.java Fix flakiness of TopPartitionsTest 2024-10-10 08:11:11 -06:00