[SERVER-55013] Improvement lifetime management in PooledLDAPConnection::runFuncWithTimeout Created: 05/Mar/21 Updated: 29/Oct/23 Resolved: 10/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.4.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Sprint: | Security 2021-03-22 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| 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. |
| Comments |
| Comment by Githook User [ 10/Mar/21 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: (cherry picked from commit 6fdb08360cb89235a75ef26b564168fadf2c1023) |
| Comment by Githook User [ 10/Mar/21 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: |