Skip to content

Assorted remote memory use fixes - #2789

Merged
Ralith merged 6 commits into
mainfrom
push-tluvsuymyuzw
Aug 17, 2026
Merged

Assorted remote memory use fixes#2789
Ralith merged 6 commits into
mainfrom
push-tluvsuymyuzw

Conversation

@Ralith

@Ralith Ralith commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This rolls up several pending security advisories.

ojhermann and others added 6 commits August 17, 2026 09:17
The `TooManyChunks` cap added in fed0321 was only checked inside the
over-allocation branch of `Assembler::insert`, and only for the tail
push. A peer sending many small gapped STREAM frames can keep
over-allocation below the defragmentation threshold while the chunk
count grows to the stream flow-control limit, and frames handled
entirely by the unordered dedup loop return before the check runs.
Either way the buffered chunk count is unbounded, which is the
memory-exhaustion class the original advisory addressed.

Check the chunk count after every push, including the unordered dedup
loop, and compact once it passes a watermark above the cap so that a
flood of mergeable (duplicate or contiguous) frames cannot force a
defragmentation on every frame. A stream is rejected once compaction
cannot bring the distinct span count back to the cap. Buffered chunks
are bounded at O(twice the cap); the count is re-checked after every
insert, though a single unordered frame may transiently push a few
chunks past the watermark before that check.
@Ralith
Ralith enabled auto-merge August 17, 2026 17:30
@Ralith
Ralith disabled auto-merge August 17, 2026 17:31
@Ralith
Ralith merged commit 35fe337 into main Aug 17, 2026
20 checks passed
@Ralith
Ralith deleted the push-tluvsuymyuzw branch August 17, 2026 17:31
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.

3 participants