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

Prevent nullptr access in checkCollectionOptions uassert

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • 155

    Description

      This can be reproduced by running:

      db.runCommand(

      { create: 'view', viewOn: 'coll' }

      );

      db.runCommand({
      create: 'view',
      viewOn: 'coll',
      collation:

      { locale: 'en' }

      });

      The first command attempts to create a view, but it fails with the error code OptionNotSupportedOnView. The second command should fail with the same error code, but instead segfaults inside checkCollectionOptions while attempting to raise this uassert.

      Collation is deliberately represented as a nullptr when there have been no special collation options set.

      This can be fixed by checking for a nullptr before raising the uassert.

      Attachments

        Activity

          People

            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: