Skip to content

Unbounded actor mailboxes enable OOM DoS across all actors #78

Closed

Description

@intendednull

Problem

All actor mailboxes in crates/actor/src/runtime.rs:108-120 use tokio::sync::mpsc::unbounded_channel() and futures_channel::mpsc::unbounded(). No actor has backpressure or capacity limits.

This affects every actor in the system:

  • Worker: NetworkActor, StateActor, HeartbeatActor, SyncActor
  • Client: StateActor instances for ServerState, DagState, ChatMeta, etc.

A malicious peer flooding gossip messages causes unbounded mailbox growth in the NetworkActor, which forwards to StateActor, causing cascading OOM.

Impact

  • Any actor can be OOM-crashed by sustained message flooding
  • No backpressure — producers never slow down
  • Affects both worker and client actor systems

Suggested fix

Replace unbounded_channel() with bounded channels:

let (tx, rx) = tokio::sync::mpsc::channel(10_000); // Bounded with backpressure

Or add per-actor message count metrics and drop/log when threshold exceeded.

Location

  • crates/actor/src/runtime.rs:108-120

References

Found during deep implementation audit (pass 2)

Activity

  1. added a commit that references this issue on Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecurity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions