[SERVER-6512] ReplicaSetMonitor::_checkConnection does not check upper bounds for the indexes Created: 18/Jul/12  Updated: 11/Jul/16  Resolved: 26/Jul/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.0.6, 2.1.2
Fix Version/s: 2.0.7, 2.2.0-rc1

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

Issue Links:
Depends
Duplicate
duplicates SERVER-6508 Resizing of _nodes and updating _mast... Closed
is duplicated by SERVER-6798 moveChunk Invalid access at address S... Closed
Related
related to SERVER-6548 Unsafe use of _master in ReplicaSetMo... Closed
related to SERVER-6647 Potential out of bounds access in Rep... Closed
related to SERVER-5058 mongos should update config seed base... Closed
is related to SERVER-6583 "couldn't connect to new shard socket... Closed
Operating System: ALL
Participants:

 Description   

There is no check for the nodesOffset variable inside checkConnection. This can cause race condition that can potentially result in accessing the _nodes outside of its bounds. The problem can potentially manifest when whenever members of a replica set shrinks in size.



 Comments   
Comment by auto [ 27/Jul/12 ]

Author:

{u'date': u'2012-07-27T07:13:08-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-6512 ReplicaSetMonitor::_checkConnection does not check upper bounds for the indexes

Make sure to invalidate the cached _master index whenever the _nodes structure is modified.
This is a short term fix - the long term is to not use indexes at all.
Branch: v2.0
https://github.com/mongodb/mongo/commit/7542d7baa9f529a4dcf6bb7a0be162c8e6949607

Comment by auto [ 26/Jul/12 ]

Author:

{u'date': u'2012-07-23T10:58:38-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: Put back SERVER-6512
Branch: master
https://github.com/mongodb/mongo/commit/674079326782d372bd30aa2b5c2839e40415e3ee

Comment by auto [ 25/Jul/12 ]

Author:

{u'date': u'2012-07-25T07:03:23-07:00', u'email': u'greg@10gen.com', u'name': u'Greg Studer'}

Message: Revert "SERVER-6512 ReplicaSetMonitor::_checkConnection does not check upper bounds for the indexes"

This reverts commit d67cf16e616a888be641a548ca132353ca427919.
Branch: master
https://github.com/mongodb/mongo/commit/d6fa8cd89d0e2bb4c1bda0b2f13eed74cd85ab49

Comment by auto [ 24/Jul/12 ]

Author:

{u'date': u'2012-07-23T10:58:38-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-6512 ReplicaSetMonitor::_checkConnection does not check upper bounds for the indexes

Make sure to invalidate the cached _master index whenever the _nodes structure is modified.
This is a short term fix - the long term is to not use indexes at all.
Branch: master
https://github.com/mongodb/mongo/commit/d67cf16e616a888be641a548ca132353ca427919

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