[SERVER-33750] ASIO's socket_ops::sync_send must never return a negative value Created: 08/Mar/18 Updated: 29/Oct/23 Resolved: 09/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonathan Reams | Assignee: | Jonathan Reams |
| 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 | ||||
| Sprint: | Platforms 2018-03-12 | ||||
| Participants: | |||||
| Linked BF Score: | 81 | ||||
| Description |
|
socket_ops::sync_send captures information about errors in a std::error_code, and apparently ASIO doesn't check that value before it adds the return value (number of bytes sent) to its count of bytes sent already. If sync_send returns -1 (because of an error), it will end up adding that to its count and then resend a byte which corrupts the message. |
| Comments |
| Comment by Githook User [ 09/Mar/18 ] |
|
Author: {'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams', 'username': 'jbreams'}Message: |