Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

libp2p/rust-libp2p
master @ 5f7eb90
3
Fixes
6
CVEs
HIGH
Peak severity
33.3%
Coverage
Highlights
Denial of Service: 3 prior fixes. Scrutinize any change in this area.
prost-codec: most-fixed (1 issue). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: Unbounded namespace registrations and unauthenticated pagination cookies in the rendezvous server allowed malicious remote peers to cause severe memory exhaustion, leading to process termination. Security was improved by enforcing strict per-peer limits and implementing an LRU cache.
Denial of Service: An integer overflow vulnerability in `Codec::decode` allowed an attacker to bypass buffer-size checks. Adding the varint length and payload length could wrap around, triggering an out-of-bounds panic inside the `split_to` function.
Denial of Service: Logging full raw gossipsub payloads during high network volume or a full send queue can exhaust disk space and degrade performance. This was mitigated by implementing a custom Debug trait that prints only the data length.