[SERVER-62665] Ensure `TransportLayerASIO::TimerService` can safely end the session Created: 14/Jan/22 Updated: 29/Oct/23 Resolved: 26/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.0.16 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||||||
| Sprint: | Service Arch 2022-1-24, Service Arch 2022-2-07 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 113 | ||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||
| Description |
|
Attempting to close SSL sockets through ASIOSession::end() is not multi-thread safe. Here is a possible scenario where we can have a read after write data-race:
We can serialize accesses to _sslSocket by threads calling into ASIOSession::end() and ASIOSession::handshakeSSLForEgressWithLock() using a mutex. This should ensure the socket is not altered while running ASIOSession::end(). |
| Comments |
| Comment by Githook User [ 17/Feb/23 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 3f92a7d72d4fe92a12aeb0f35bb6110fbce8ceb9) |
| Comment by Uladzimir Makouski [ 17/Feb/23 ] |
|
Reoccurring on v5.0 branch: BFG-1815688 |
| Comment by Githook User [ 26/Jan/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |