[SERVER-46942] State information can be leaked if server closes too quickly on network_interface_tl Created: 18/Mar/20 Updated: 29/Oct/23 Resolved: 07/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.2.4, 4.0.17 |
| Fix Version/s: | 4.2.6, 4.0.19 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Amirsaman Memaripour |
| 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.0
|
||||||||
| Sprint: | Service Arch 2020-04-06, Service arch 2020-04-20 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 74 | ||||||||
| Description |
|
The network_interface_tl binds its command states into async lambdas for connection establishment, timeout, and command response resolution. However, the timer lambda here can cause a leak if the command state is canceled. Since the timer is a member of the command state itself, we need to cancel the timer to break the lifetime dependency cycle. We do it here, too late in program flow to observe cancelation. We should cancel the timer earlier in the command response resolution. This issue exists for v4.0 and v4.2. It is fixed for v4.4 by a reorganization (see here). |
| Comments |
| Comment by Githook User [ 23/Apr/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Avoid leaking state information if server closes too quickly on network_interface_tl. (cherry picked from commit b43425cf31637d9f2dfd35eb7b09d372631e09fb) |
| Comment by Githook User [ 07/Apr/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Avoid leaking state information if server closes too quickly on network_interface_tl. |