Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4215

Closing a MongoClient twice with AutoEncryptionSettings causes double free and crash

      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@mongodb.com Ross Lawley
            Reporter:
            spencer.brown@mongodb.com Spencer Brown
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: