[SERVER-46071] Server parameters with AtomicWord<int> do not handle out of bound values gracefully Created: 10/Feb/20 Updated: 29/Oct/23 Resolved: 21/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 4.2.3, 4.3.3 |
| Fix Version/s: | 4.3.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | William Schultz (Inactive) | Assignee: | Sara Golemon |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||
| Sprint: | Security 2020-02-24 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 95 | ||||||||||||||||||||||||
| Description |
|
Some server parameters are backed by an AtomicWord<int> type. These types do not gracefully handle input values outside the range of representable int values when we try to coerce the arguments here. Our undefined behavior builders manifest this as a runtime error when trying to set a parameter to NaN, for example. See the attached repro for a few examples of server parameters with this issue. This may be a general issue for any numeric server parameters that do not use a BSONElement::safeNumberLong deserializer. |
| Comments |
| Comment by Sara Golemon [ 21/Feb/20 ] |
|
This changes how invalid values are reported to the user. Previously, invalid values may result in under-defined behavior. Now the user gets a useful error. |
| Comment by Githook User [ 21/Feb/20 ] |
|
Author: {'username': 'sgolemon', 'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com'}Message: |