Skip to content

admin: the login verification pool has no bounded wait, so an unauthenticated burst queues the operator's sign-in #1188

Open

Description

@chappie-daemon

Found by: the security lens in review round 6 of job 032-admin-console-parity (round-6/review-security.md, note on subject 3). Non-blocking there — filed so it is tracked.

crates/nostream-admin/src/state.rs:611-626 bounds concurrent password verifications with a semaphore of 4 but waits on acquire_owned() with no timeout, so a burst of unauthenticated POST /login attempts queues every later verification behind it.

Measured: five concurrent verifications — four completed in 3.31–3.46 s, the fifth in 5.21 s, queued behind a permit. One address's ten login attempts (its per-address limit) hold all four permits; several addresses sustain it. The operator's own sign-in then waits behind strangers, while the relay wire is unaffected.

Fix direction: a bounded wait — try_acquire/timeout on the permit with a 503/429 answer and the capture's error shape — and a test that a burst cannot delay a later login beyond a stated bound. Keep the ADMIN_PASSWORD byte-compare path ahead of the pool.

Oracle it inherits: an admin_http-style case measured the way round 6 measured it (five concurrent attempts, the fifth's latency), asserting the bound.

Closing: Closes #N is inert on a PR targeting rewrite/main; close by hand with the merge sha.

Activity

  1. added
    security
    rewrite
    rust
    factory
    on Nov 19, 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

    factoryrewriterustsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions