Skip to content

fix(security): cluster auth tracker saturation DoS (#185) - #186

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
security/cluster-auth-tracker-saturation
Draft

fix(security): cluster auth tracker saturation DoS (#185)#186
cursor[bot] wants to merge 4 commits into
mainfrom
security/cluster-auth-tracker-saturation

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Security fix — Medium

Issue: #185

Location: src/cluster/security.rs

Impact: An unauthenticated attacker who fills the 10k-entry cluster auth failure map (one failed handshake per source IP) could block all new peer IPs from completing control/media auth—even with a valid CLUSTER_SECRET—until entries aged out.

Fix: Mirror the HTTP rate limiter eviction strategy from #36:

  • Purge expired buckets
  • LRU-evict only IPs that are not actively throttled (<10 failures / 60s)
  • Fail closed only when every tracked bucket is actively throttled

Tests: Added unit coverage for eligible-bucket eviction and fail-closed when every bucket is throttled.

Closes #185.

Open in Web View Automation 

cursoragent and others added 2 commits September 4, 2026 02:05
The per-IP cluster auth lockout added in #182 rejected every new source
IP once the 10k-entry failure map filled, even for peers presenting a
valid CLUSTER_SECRET. Mirror the HTTP rate limiter: LRU-evict only
non-throttled buckets and fail closed solely when every entry is actively
throttled.

Fixes #185.

Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
cursor Bot and others added 2 commits September 5, 2026 00:05
* fix(ci): apply rustfmt to cluster auth throttle helper

Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>

* Update Cargo.lock

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster auth failure tracker saturation denies handshakes from new peer IPs

1 participant