Skip to content

Unbounded memory growth: message history, pending SRP sessions, no rate limits #20

Open

Description

@diorwave

[verified] — 3,000 abandoned /srp/init calls left 3,001 entries in SRPAuthManager.sessions.

  • MessageStore grows forever (each message up to 1 MiB, Sanic's default frame limit).
  • SRPAuthManager.sessions gains an entry per /srp/init. It's only removed on a failed verify; abandoned inits and successful sessions are never removed (remove_session is never called anywhere).
  • cleanup_stale only cleans UserSessionStore, not SRP sessions.
  • No rate limiting on /srp/init//srp/verify, which also allows unlimited online password guessing.

Fix

Related: PR #6 adds per-IP rate limiting on SRP endpoints and a 1000-message history cap.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions