[SERVER-59690] Coverity analysis defect 120616: Out-of-bounds read Created: 31/Aug/21  Updated: 29/Oct/23  Resolved: 15/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-09-20
Participants:

 Description   

Out-of-bounds read

Incorrect values read from a different memory region will cause incorrect computations. Out-of-bounds read from a buffer
/src/mongo/bson/util/simple8b_type_util.cpp:200: OVERRUN 120616 Checking "size > 16UL" implies that "size" may be up to 16 on the false branch.
/src/mongo/bson/util/simple8b_type_util.cpp:205: OVERRUN 120616 Overrunning array of 16 bytes at byte offset 16 by dereferencing pointer "arr + size".



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 15/Sep/21 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-59690 Zero initialize array in Simple8bTypeUtil::encodeBinary
Branch: master
https://github.com/mongodb/mongo/commit/4e4500065fac7036399cb53dd0bc82f5b1a8e7b7

Generated at Thu Feb 08 05:47:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.