[SERVER-74330] Prevent nullptr access in checkCollectionOptions uassert Created: 23/Feb/23 Updated: 29/Oct/23 Resolved: 24/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jennifer Peshansky (Inactive) | Assignee: | Jennifer Peshansky (Inactive) |
| 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 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 155 | ||||||||||||
| Description |
|
This can be reproduced by running: db.runCommand( { create: 'view', viewOn: 'coll' }); db.runCommand({ }); The first command attempts to create a view, but it fails with the error code OptionNotSupportedOnView. The second command should fail with the same error code, but instead segfaults inside checkCollectionOptions while attempting to raise this uassert. Collation is deliberately represented as a nullptr when there have been no special collation options set. This can be fixed by checking for a nullptr before raising the uassert. |
| Comments |
| Comment by Githook User [ 24/Feb/23 ] |
|
Author: {'name': 'Jennifer Peshansky', 'email': 'jennifer.peshansky@mongodb.com', 'username': 'jenniferpeshansky'}Message: |