Skip to content

Process-wide DNS resolver queue exhaustion denies outbound RTMP connects #196

Description

@cursor

Summary

All Client::connect() calls in a process share a single DNS worker queue capped at 32 jobs. The 33rd concurrent connect attempt fails immediately with ErrorCode::Timeout, even when DNS itself is healthy.

Attacker

Any workload in the same process that can trigger many concurrent outbound Client::connect() calls (remote user requesting many streams, compromised thread, or hostile co-hosted workload in the embedder).

Controlled input

33+ simultaneous connect attempts requiring DNS resolution.

Attack path

  1. All clients share one mpsc::sync_channel DNS worker (DNS_TX, depth 32) in resolve_socket_addrs().
  2. try_send on the 33rd job returns ErrErrorCode::Timeout.
  3. Legitimate concurrent outbound connects in the same process fail even though DNS is available.

Impact

Cross-client denial of service inside a single embedder process (e.g. media gateway spawning many outbound RTMP pulls). Unrelated legitimate connects fail when the queue is saturated.

Location

src/client/mod.rs

Remediation

Increase queue depth, block with a deadline instead of failing immediately on try_send, or isolate DNS resolution per connect with a global concurrency limit separate from the queue depth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions