[SERVER-59946] Uninitialized regions RecordId::_buffer may be accessed by synthesized lifecycle methods Created: 14/Sep/21  Updated: 29/Oct/23  Resolved: 16/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: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-59899 Coverity analysis defect 120719: Unin... Closed
is duplicated by SERVER-59900 Coverity analysis defect 120713: Unin... Closed
is duplicated by SERVER-59901 Coverity analysis defect 120726: Unin... Closed
is duplicated by SERVER-59902 Coverity analysis defect 120729: Unin... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Dev Platform 2021-09-20
Participants:

 Description   

The _buffer field in RecordId is (apparently intentionally) uninitialized. That isn't a problem in itself, but the current implementation relies on compiler generated copy operations which can access this field. Either the field needs to be initialized with zero bytes, or explicit lifecycle methods need to be implemented which honor the type tag and avoid reading from the uninitialized region of the _buffer field.



 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 [ 16/Sep/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-59946 Zero initialize buffer in RecordId
Branch: master
https://github.com/mongodb/mongo/commit/63d239c67ebd2aeb895275fecf2f5d5fb754ada7

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