Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-98809

Run validateBSON before attempting to parse an untrusted buffer as BSON

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • 200

      The BSONObj constructor doesn't take into account the length of the buffer being read from, and so buffer over-reads can occur if we are constructing from an untrusted source. This happens when we pass a malformed keyfile to the server – if we get unlucky in a particular way, this can cause a buffer over-read during a check on the object. Run validateBSON before we construct to avoid this.

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            gabriel.marks@mongodb.com Gabriel Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: