Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-165

Binary protocol buffer allocation and result caching relies on value length from the server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.7, 1.1.8
    • 1.1.9, 1.0.8
    • General
    • None

    Description

      That creates opportunity for evil server to a) crash the application b) read adjacent memory areas that may be exposed to the application and may or may not(depending on the application) be sent to the server as part of the following queries(if the data is used for executing of the following queries).
      This happens that bind buffer is allocated based on field length(clamped by) value(we're talking about variable length types here). But then in case of row data caching that happens in case of moving to the next RS and/or in case of connection is requested for other operation and result was streamed from the server, the copying to the local cache happened trusting length value from the server, that evil server can make whatever big and bigger than field length size. That can cause reading and copying of the data past the allocated buffer.

      Attachments

        Issue Links

          Activity

            People

              Lawrin Lawrin Novitsky
              Lawrin Lawrin Novitsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.