Skip to content

[Java] Reject a group blockLength below the fields of the acting version - #1153

Open
slachiewicz wants to merge 4 commits into
aeron-io:masterfrom
slachiewicz:java-group-block-length-check
Open

slachiewicz wants to merge 4 commits into
aeron-io:masterfrom
slachiewicz:java-group-block-length-check

Conversation

@slachiewicz

Copy link
Copy Markdown
Contributor

Generated group decoders accepted any blockLength. With blockLength 0, every element overlaps the next, so a small frame of nested group headers expands into millions of elements in toString() or other full walks. The group wrap now rejects a non-empty group whose blockLength is smaller than the fields present at the acting version.

The minimum depends on the version, so a block from an older sender that ends before later fields, or before composite members added in a later version, still decodes. Constant fields are left out because they have no bytes on the wire. A decoder that passes its own schema version as the acting version, rather than the version from the header, now rejects shorter blocks from older senders.

Part of #969.

Verified: GroupBlockLengthTest fails on master (8 of 14 cases) and passes here; sbe-tool checkstyle, tests, verifyJavaIrCodecsInSync, sbe-samples check and sbe-benchmarks compile pass.

@slachiewicz
slachiewicz force-pushed the java-group-block-length-check branch 2 times, most recently from f09181d to 10844b5 Compare November 19, 2026 21:00
@slachiewicz
slachiewicz force-pushed the java-group-block-length-check branch from 10844b5 to 8ef764d Compare November 27, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant