[MONGOCRYPT-360] mongocrypt_kms_ctx_feed should return an error when given an empty bytes Created: 16/Nov/21  Updated: 28/Oct/23  Resolved: 19/Oct/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: 1.7.0, 1.7.0-alpha0

Type: Improvement Priority: Unknown
Reporter: Shane Harvey Assignee: Gil Alon
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to PYTHON-3017 Potential hang in CSFLE when reading ... Closed

 Description   

In PYTHON-3017 I discovered a bug in pymongo's CSFLE implementation where the kms_request I/O feeding loop could end up in an infinite loop. Libmongocrypt could prevent this type of bug by returning an error if mongocrypt_kms_ctx_feed is called with an empty mongocrypt_binary_t bytes.



 Comments   
Comment by Githook User [ 19/Oct/22 ]

Author:

{'name': 'Gil Alon', 'email': '47804748+galon1@users.noreply.github.com', 'username': 'galon1'}

Message: MONGOCRYPT-360 returns an error when kms_ctx_feed is called with empty bytes (#478)

MONGOCRYPT-360 kms_ctx_feed returns an error with empty bytes
Branch: master
https://github.com/mongodb/libmongocrypt/commit/8f69279908d03122720e8a848cd2fe37dc07304b

Comment by Gil Alon [ 18/Oct/22 ]

PR: https://github.com/mongodb/libmongocrypt/pull/478

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