Closing a MongoClient twice with AutoEncryptionSettings causes double free and crash

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This issue is easily reproducible and I can supply a sample program on request. Triggering conditions are creating a MongoClient for CSFLE, adding AutoEncryptionSettings, connecting to some MongoDB and doing something (it does not need to actually involve any encryption), closing the MongoClient, then closing it again. The second close causes a double free exception, and depending on your environment, can cause a crash dump or heap corruption error.

      If the MongoClient is not using AutoEncryption settings, you can close it twice with no ill effects.

      Driver version is 4.2.3 (sync), mongodb-crypt version is 1.2.0.

              Assignee:
              Ross Lawley
              Reporter:
              Spencer Brown
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: