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

Improvement lifetime management in PooledLDAPConnection::runFuncWithTimeout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0, 4.4.5
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Security 2021-03-22
    • Case:

      Description

      There is a lifetime management issue in PooledLDAPConnection::runFuncWithTimeout, seeĀ https://github.com/10gen/mongo-enterprise-modules/blob/master/src/ldap/connections/ldap_connection_factory.cpp#L221-L261. In this function, we access this but we do nothing to guarantee that this is alive when it is used. In the stack below, we see a call to a lambda in WrappedConnection::query::lambda but I could not find any stack in the process with a matching stack containing WrappedConnection::query. This implies that the query() call timed out and the connection was likely reaped why it was still being used.

        Attachments

          Activity

            People

            Assignee:
            mark.benvenuto Mark Benvenuto
            Reporter:
            mark.benvenuto Mark Benvenuto
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: