Skip to content

fix(codecs): [OBE-11235] bound GELF chunked reassembly by default - #141

Merged
ajayshekar-s1 merged 2 commits into
Sentinel-One:masterfrom
JuanMantica45:oom-gelf-chunked-defaults
Aug 11, 2026
Merged

fix(codecs): [OBE-11235] bound GELF chunked reassembly by default#141
ajayshekar-s1 merged 2 commits into
Sentinel-One:masterfrom
JuanMantica45:oom-gelf-chunked-defaults

Conversation

@JuanMantica45

Copy link
Copy Markdown
Contributor

What

pending_messages_limit now defaults to 10000 and max_length to 8 MiB. Both were unlimited, so a sender could grow the reassembly map without bound.

Why these values

Both sit above what the wire format can produce, so a well-formed sender never reaches them:

  • 8 MiB — the protocol caps a message at 128 chunks (GELF_MAX_TOTAL_CHUNKS) × the 65507-byte max UDP payload, so no valid message exceeds ~8.4 MB. Graylog's own decompress_size_limit default is also 8 MiB.
  • 10000 — Graylog Server has no cap here at all, relying purely on its 5s reassembly timeout, so this is sized well above what a legitimate sender holds in flight inside that window.

Both errors are per-message and keep can_continue() == true, so one bad sender cannot drop messages multiplexed over the same connection.

Testing

cargo test -p codecs --lib decoding::framing::chunked_gelf — 34 passing.

Jira: OBE-11235

The chunked GELF framer tracked incomplete messages with no cap on either the
number of concurrent message ids or the size of one reassembled message, so a
sender could grow the reassembly map without limit.
Defaults are chosen above what the wire format can produce, so a well-formed
sender never reaches them:
- max_length 8 MiB. The protocol caps a message at 128 chunks
(GELF_MAX_TOTAL_CHUNKS) x the 65507-byte max UDP payload, so no valid message
can exceed ~8.4 MB. Graylog's own decompress_size_limit default is also 8 MiB.
- pending_messages_limit 10000. Graylog Server has no cap here at all, relying
purely on its 5s reassembly timeout, so this is sized well above what a
legitimate sender holds in flight inside that window.
Both errors are per-message and keep can_continue() == true, so one bad sender
cannot drop messages multiplexed over the same connection.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ajayshekar-s1
ajayshekar-s1 merged commit 37ba66c into Sentinel-One:masterAug 11, 2026
Sign up for freeto 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.

2 participants

@JuanMantica45@ajayshekar-s1