Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6647

Potential out of bounds access in ReplicaSetMonitor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-rc0
    • Fix Version/s: 2.0.8, 2.2.0-rc1
    • Component/s: Internal Client
    • Labels:
      None
    • Operating System:
      ALL

      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;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              renctan Randolph Tan
              Reporter:
              renctan Randolph Tan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: