[SERVER-16732] SyncSourceFeedback::replHandshake() may perform an illegal erase from a std::map in some circumstances Created: 06/Jan/15  Updated: 19/Jun/15  Resolved: 06/Jan/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.6
Fix Version/s: 2.6.7

Type: Bug Priority: Critical - P2
Reporter: Andy Schwerin Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-18091 Segmentation fault Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

SyncSourceFeedback::replHandshake() calls _slaveMap.erase(_slaveMap.find(removeItr->first)). However, _slaveMap.find(removeItr->first) may return _slaveMap.end(), which is an illegal argument to _slaveMap.erase(). This could lead to memory corruption.



 Comments   
Comment by Githook User [ 06/Jan/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-16732 prevent an illegal erase from _slaveMap
Branch: v2.6
https://github.com/mongodb/mongo/commit/4b7a350224eef7676b4c49e2616bc2bee347420f

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