The /sdp endpoint that trusted its callers: fixing a memory-amplification DoS in py-libp2p
6.3 relevance
Score Breakdown
technical depth 8
novelty 7
actionability 5
community 4
strategic 4
personal 7
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Deep dive into a libp2p DoS vulnerability with memory amplification, strong technical depth.
Summary
A memory-amplification DoS vulnerability in py-libp2p's /sdp endpoint allowed unauthenticated callers to send unbounded HTTP bodies and headers, causing the server to buffer attacker-controlled data with no upper limit before any handshake. The fix caps the SDP body at 32 KiB, rejects oversized requests with a 413 status in ~0.3 ms, and limits header lines, reducing peak RSS from over 2 GB to 61 MB under a 1 GiB malicious payload. The issue was caught during a code review of a WebRTC-Direct transport PR, not via production monitoring.