Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-421

CSFLE shared library from previous mongocrypt_t is unexpectedly reused

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Not Needed

      https://mongodb.slack.com/archives/C02TYVCDYHZ/p1650373327707989

      There’s something weird going on with the global csfle library state management. In a situation in which there is no global system csfle library, if a mongocrypt_t is initialized with csfleSearchPaths: ['$SYSTEM'], the library is being used even if there is no global shared library but if another mongocrypt_t was previously initialized with csflePath set to a shared library path

      i.e.

      > new MongoCrypt({ csfleSearchPaths: ['$SYSTEM'] }).csfleVersionInfo
      null
      > new MongoCrypt({ }).csfleVersionInfo
      null
      > new MongoCrypt({ csflePath: '/.../mongo_csfle_v1.so', csfleSearchPaths: ['$SYSTEM'] }).csfleVersionInfo
      { version: 105553653141504n, versionStr: 'stubbed-mongo_csfle' }
      > new MongoCrypt({ csfleSearchPaths: ['$SYSTEM'] }).csfleVersionInfo
      { version: 105553653141504n, versionStr: 'stubbed-mongo_csfle' }
      > new MongoCrypt({ }).csfleVersionInfo
      null
      even though the 4th call and the 1st one specify the same options
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: