Skip to content

fix: bound shim connection admission without limiting healthy stream lifetimes #71

Closed

Description

@abruption

Verified gap

The accept loop starts a new daemon thread for every accepted connection with no active-handler limit. listen(64) bounds the pending socket backlog, not active handlers. Established forwarding uses additional worker threads and intentionally long-lived blocking streams.

#5/#13 already added setup deadlines and cleanup, and those protections remain present; this is the separate concurrent-admission limit, not a reopening of that fixed deadline issue. The listener is loopback-only. No remote exploit or actual resource-exhaustion incident was demonstrated.

Scope and acceptance

  • Introduce a finite, documented active-connection budget before allocating handler/bridge work; define overload behavior that promptly closes/rejects excess sockets without an unbounded queue.
  • Release capacity on normal EOF, setup failure, exception and thread-start failure. Ensure accepted sockets close if thread creation fails.
  • Preserve normal long-lived control/DERP sessions; do not turn setup timeouts into arbitrary lifetime limits.
  • Isolated tests exercise capacity, excess connections, concurrent failures and recovery after slots free, with measured bounded handler/worker growth and no leaked sockets.
  • Document the local-process threat boundary and operational tuning. Keep port/VM-replacement work in existing feat: make SSH port configurable with backward-compatible defaults #63/research: validate Dots lifecycle, recovery, and proxy compatibility #20; no public listener or service restart is implied.

Verification boundary

Read-only source/API review on 2026-10-29 at main 2dc8d703abdd932b395e2f08c31e10723caed103. The Claude Code report was treated as a hypothesis, not test evidence. No production scripts, tests, services, deployment, keys or repository settings were changed. Existing open and closed issues and PRs were searched before filing; this is a new, bounded hardening task, not a confirmed compromise.

Activity

  1. added this to the v0.8.0 milestone on Oct 29, 2026
  2. added
    bug
    priority: high
    security
    on Oct 29, 2026
  3. self-assigned this
    on Oct 29, 2026
  4. abruption commented on Oct 29, 2026

    @abruption
    OwnerAuthor

    Development implementation is available in PR #74: #74

    The candidate admits at most 64 active connections by default, configurable to 1..256, before starting handler work. It retains healthy stream lifetimes and cleans up bridge/receiver ownership. Socket/TLS stand-ins and a shutdown negative control cover the stated boundaries; they are not live TLS or production load evidence.

    The reviewed runtime candidate passed Linux core CI on Python 3.11/3.13 (541 tests each, zero skipped), plus the scoped independent Claude/Codex review process. Exact revisions, research checks, fixture limits and remaining gates: https://github.com/abruption/dots-tailscale/blob/feat/v080/docs/validation/v0.8.0-development-review.md

    PR-head checks are recorded on #74. No merge, tag/release or operating deployment is included in this development update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority: highsecurity

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions