Skip to content

refactor: add MaxFrameLimit to libp2p connections#228

Merged
Aman035 merged 3 commits intoaudit-fixesfrom
F-2026-16939
May 8, 2026
Merged

refactor: add MaxFrameLimit to libp2p connections#228
Aman035 merged 3 commits intoaudit-fixesfrom
F-2026-16939

Conversation

@Aman035
Copy link
Copy Markdown
Member

@Aman035 Aman035 commented May 8, 2026

1 MiB cap on frames is added. The length prefix is checked against the cap before any allocation, and the underlying reader is wrapped in a limit reader as defense-in-depth. The send path carries the same cap.

1 MiB is sized off measurement - an end-to-end DKLS keygen + sign for a 100-party committee (t=67) produced a max single message of ~39 KiB (keygen) and ~48 KiB (sign), so 1 MiB is ~20× headroom.

@Aman035 Aman035 closed this May 8, 2026
@Aman035 Aman035 reopened this May 8, 2026
@Aman035 Aman035 merged commit 9524142 into audit-fixes May 8, 2026
9 checks passed
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