[SERVER-57216] UUID::gen use-after-destroy Created: 26/May/21  Updated: 29/Oct/23  Resolved: 27/May/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: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2021-05-31
Participants:
Linked BF Score: 0

 Description   

BF-20646
This was caught on Windows where SecureRandom is implemented by the Bcrypt library and some state went off the rails, but it should be a platform-independent problem. Some code (mongo::JournalFlusher::run() in this case) is trying to make a UUID, but main is already dying and the global uuidGen object is accessed after it's died.



 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 [ 26/May/21 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-57216 make `UUID::gen()` valid after main exits
Branch: master
https://github.com/mongodb/mongo/commit/f5ac267725c208d4cb881fd6b605dd8dad59b319

Comment by Billy Donahue [ 26/May/21 ]

SERVER-57219 addresses a different but related factor contributing to BF-20646. It's unexpected that UUID::gen is being called at all after main. This ticket makes it at least valid to do so, expectedly or not.

Comment by Billy Donahue [ 26/May/21 ]

Easy quick fix available, so scheduling while the iron is hot.

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