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

crash on invalid BSON data when constructing BSONObj

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Internal Client
    • Labels:
    • Environment:
      Linux 2.6.38-13-generic-pae #53-Ubuntu SMP i686 athlon i386 GNU/Linux
    • Operating System:
      Linux

      Description

      ::mongo::BSONObj class has insufficient validation for bad data. This means that on some bad input it may crash. See the attached test case which shows an example bad data which demonstrates the problem - this is based on real data we've got from core dump in our application. See also the proposed fix for the code in the attached diff.

        Attachments

        1. bsonfix.patch
          1 kB
        2. bsonfix-nightly.patch
          1 kB
        3. core
          276 kB
        4. crash
          162 kB
        5. crash.cpp
          17 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: