CSFLE shared library from previous mongocrypt_t is unexpectedly reused

XMLWordPrintableJSON

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

      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
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: