#2028 Insufficient validation of archive query limits

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

    **Description** Result Set Management (RSM) fields used by message archive queries were parsed with an overly permissive number conversion. In particular, a negative max value could become a negative SQL LIMIT, which SQLite treats as unlimited. A user able to query an archive could therefore bypass max_archive_query_results and cause the server to materialise an entire archive before discarding the excess results. **Affected configurations** The issue affects mod_mam and mod_muc_mam with SQL storage and archives larger than max_archive_query_results (default 50). **Mitigation** The best mitigation is to upgrade to 13.0.8 or later. **Fixes** RSM integer fields are now validated as non-negative xs:int values, invalid fields result in a bad-request error response, and storage backends have been updated to reject an invalid limit. Commits: 7736c449c89a (util.stanza), b4bdfcf99936 (util.rsm), 87112f85540a (mod_mam), 24760c378cb7 (mod_muc_mam), 293d65d0e4ee (mod_storage_sql), 8529a3611c31 (mod_storage_memory), 3eff825ca2cb, 4fa97a839d7a. **Attribution** This issue was identified in an external security review.

  2. MattJ on

    Correction: The 3eff825ca2cb and 4fa97a839d7a mentioned in the previous description are commits unrelated to this issue (copy/paste error).

  3. MattJ on

    Changes
    • tags Hidden

New comment

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