[SERVER-6647] Potential out of bounds access in ReplicaSetMonitor Created: 30/Jul/12  Updated: 11/Jul/16  Resolved: 30/Jul/12

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.2.0-rc0
Fix Version/s: 2.0.8, 2.2.0-rc1

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-6512 ReplicaSetMonitor::_checkConnection d... Closed
Operating System: ALL
Participants:

 Description   

massert( 15899, str::stream() << "No suitable secondary found for slaveOk query in replica set: "
         << _name, _master >= 0 && _nodes[_master].ok ); // <----------- _master can be out of bounds here
 
// Fall back to primary
verify( static_cast<unsigned>(_master) < _nodes.size() );

and here (ReplicaSetMonitor::_check):

probablePrimaryIdx = _find_inlock( maybePrimary );
probablePrimaryConn = _nodes[probablePrimaryIdx].conn;



 Comments   
Comment by auto [ 15/Oct/12 ]

Author:

{u'date': u'2012-10-15T14:01:20-07:00', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}

Message: SERVER-6647 Potential out of bounds access in ReplicaSetMonitor

Backport of commit f86f60afe1ee1af619662002e8640cf6555aef02
Branch: v2.0
https://github.com/mongodb/mongo/commit/239d7d6a195f7dff5ad32b6cb29cd64e635c1889

Comment by auto [ 30/Jul/12 ]

Author:

{u'date': u'2012-07-30T13:49:31-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-6647 Potential out of bounds access in ReplicaSetMonitor
Branch: master
https://github.com/mongodb/mongo/commit/f86f60afe1ee1af619662002e8640cf6555aef02

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