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

Writing an invalid config.queryAnalyzers or config.mongos document causes the server to crash

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Sharding NYC 2023-04-17

    Description

      The callback for onInsert, onUpdate and onDelete for the config.queryAnalyzers or config.mongos collections in the QueryAnalysisOpObserver all involve parsing the document BSONobj into the corresponding IDL types. If the document doesn't have the expected fields, the parser would thrown an error and cause the server to crash because onCommit() is noexcept. Users are unlikely to ever write to these internal collections but it is still important to prevent such issue from happening. That is, the document BSONObj should get parsed outside of the callback to make the write fail earlier with a uassert instead of later during commit time.

      Attachments

        Activity

          People

            cheahuychou.mao@mongodb.com Cheahuychou Mao
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: