-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
The Connection::unidir_receive
function in the plugin-support
crate (age-core/src/plugin.rs:229-279
) appends every stanza to in-memory vectors with no upper bound. A misbehaving or malicious peer can stream arbitrary data and exhaust memory, leading to denial-of-service attacks.
Recommendation:
Impose hard per-phase caps (e.g., 1,024 stanzas or 8 MiB total) and abort on excess. The implementation should validate vector sizes before appending and return appropriate errors when limits are exceeded, preventing memory exhaustion while maintaining protocol compatibility.
Metadata
Metadata
Assignees
Labels
No labels