[SERVER-77299] Pooled LDAP connections may reference out-of-scope memory after timeout Created: 18/May/23  Updated: 29/Oct/23  Resolved: 17/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc8, 4.4.24, 5.0.20, 6.0.9

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Varun Ravichandran
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-77502 LDAP connection pool may use dangling... Closed
is duplicated by SERVER-75153 Log LDAP disconnect leaks and limit c... Closed
Related
is related to SERVER-77962 Investigate automated injection of fa... Investigating
Assigned Teams:
Server Security
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0, v4.4
Sprint: Security 2023-06-12, Security 2023-06-26, Security 2023-07-10, Security 2023-07-24
Participants:
Case:

 Description   

WrappedConnection::bindAsUser invokes an underlying LDAP connection's bindAsUser method, by is scheduling a lambda onto an executor which calls the method, and waiting for the resolution of a result future. This future might be resolved by successful conclusion of the lambda, or by a timeout alarm.

Unfortunately, it is possible for the timeout to elapse and for WrappedConnection::bindAsUser to return with a not-OK Status before the lambda completes its execution. This means that reference captured variables used by the lambda might fall out of scope while they are being used.


Generated at Thu Feb 08 06:35:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.