[MONGOCRYPT-9] libmongocrypt segfaults if no aws provider data is given, but aws data key creation is requested Created: 12/Jun/19  Updated: 28/Oct/23  Resolved: 17/Jun/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matt Broadstone Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Build libmongocrypt library

 Description   

I accidentally was passing the object:

{ aws: { aws: { accessKeyId: '...', secretAccessKey: '...' } }

rather than just:

{ aws: { accessKeyId: '...', secretAccessKey: '...' } }

which results in a segfault:

[mbroadst@gorgor node-mongodb-crypt (master ✗)]$ MONGODB_CRYPT_DEBUG=1 node ./node_modules/.bin/mocha test/clientEncryption.test.js
 
 
  ClientEncryption
(node:4653) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
    1) should create a data key with the "local" KMS provider
INFO mongocrypt_setopt_kms_provider_aws (aws_access_key_id="", aws_access_key_id_len=0, aws_secret_access_key="", aws_secret_access_key_len=0)
INFO mongocrypt_ctx_setopt_masterkey_aws (region="region", region_len=6, cmk="cmk", cmk_len=3)
[1]    4651 segmentation fault  MONGODB_CRYPT_DEBUG=1 node ./node_modules/.bin/mocha



 Comments   
Comment by Githook User [ 14/Jun/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3189 handle empty AWS creds
Branch: master
https://github.com/mongodb/libmongocrypt/commit/55f5407e041684d7565cdd68cec700fe934406e3

Generated at Thu Feb 08 09:07:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.