Skip to content

Tenderlink: Guard BFT packet allocations - #34

Open
endophysics wants to merge 1 commit into
ShieldedLabs:mainfrom
endophysics:bft-oom-guards-s2v8
Open

Tenderlink: Guard BFT packet allocations#34
endophysics wants to merge 1 commit into
ShieldedLabs:mainfrom
endophysics:bft-oom-guards-s2v8

Conversation

@endophysics

Copy link
Copy Markdown
Contributor

Add defensive bounds around BFT packet handling to reduce OOM risk during malformed traffic or congestion.

Overview:

  • Caps transport jumbogram reassembly at the existing 8 MiB MAX_JUMBOGRAM_LEN before resizing buffers.
  • Uses checked offset arithmetic to avoid overflow in fragment reassembly.
  • Drops invalid/oversized fragment senders instead of panicking on retry failure.
  • Adds an 8 MiB BFT proposal size cap.
  • Rejects oversized, overflowing, or out-of-range proposal chunks before allocation.
  • Re-checks proposal bounds after signature verification before mutating BFT round state.
  • Fixes rounds_data pruning so decided historical rounds are not retained twice after being copied into recent_commit_round_cache.

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