Run validateBSON before attempting to parse an untrusted buffer as BSON

XMLWordPrintableJSON

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

      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
            Reporter:
            Gabriel Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: