Uploaded image for project: 'MariaDB Connector/R2DBC'
  1. MariaDB Connector/R2DBC
  2. R2DBC-127

Reject multipart (>16 MB) packets before authentication to prevent pre-auth OOM from a rogue server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.2, 1.3.2, 1.2.4
    • other
    • None

    Description

      Reader.readPacket() reassembles multipart packets by reallocating the receive buffer for each 0xffffff-length fragment with no size ceiling. A malicious or MitM'd server can stream endless max-length fragments and drive the client to OutOfMemoryError before authentication.

      No legitimate packet during the handshake/authentication phase is anywhere near 16 MB, so multipart reassembly should not be permitted at that stage at all.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.