PYTHON-6256 Out-of-bounds read in BSON array decoding
Description
An out-of-bounds read in the native C BSON decoding extension of the MongoDB Python Driver may allow an unauthenticated party who can supply crafted BSON data to the decoder to cause the application process to terminate. In some configurations, nearby process memory may be included in error messages, which may result in limited unintended disclosure of data.
Details
See jira.mongodb.org/
Proof of concept
See jira.mongodb.org/
Impact
The read is out of bounds: 4 to 8 bytes past the input allocation. On default builds the over-read value is discarded and decode() raises InvalidBSON; under hardened allocators the read aborts the process.