#2020 Memory exhaustion via aborted HTTP requests

Reporter MattJ
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Milestone-13.0
  • Status-Fixed
  • Priority-High
  • Type-Defect
  • Security
  1. MattJ on

    **Description** A remote, unauthenticated attacker can cause Prosody to retain memory when an HTTP connection carrying an incomplete response is closed. The affected code path is used by BOSH long-polling, but the underlying HTTP server issue applies to any handler that holds a response open. When the client disconnects, the request's async runner remains referenced from util.async's waiting_runners table. The request, response and connection objects therefore remain reachable indefinitely. Repeated requests consume memory without requiring authentication. **Affected configurations** All 13.0 deployments prior to 13.0.8 are believed to be affected. Exposure is highest where mod_bosh is enabled and reachable by untrusted clients. Deployments behind a reverse proxy may also experience the leak when the proxy abandons upstream requests. **Mitigation** Operators who cannot upgrade immediately should limit request rates and concurrent connections at the reverse proxy or firewall, and should configure proxy timeouts so abandoned upstream requests are rare. **Fixes** The HTTP server now completes and releases the waiting runner when a connection is closed with an open response, marks the HTTP session as disconnected, and does not resume destroyed connections or dispatch queued requests after disconnect. Commit: f215eb8ec541 **Attribution** The issue was reported privately to the Prosody team by an operator.

  2. MattJ on

    Changes
    • tags Milestone-13.0
  3. MattJ on

    Changes
    • tags Hidden

New comment

Not published. Used for spam prevention and optional update notifications.