[SERVER-72107] Parsing strings in KeyString can throw Overflow error Created: 14/Dec/22  Updated: 29/Oct/23  Resolved: 29/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0, 6.0.6

Type: Bug Priority: Major - P3
Reporter: Henrik Edin Assignee: Shin Yee Tan
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Execution Team 2023-02-20, Execution Team 2023-02-06, Execution Team 2023-03-06, Execution Team 2023-03-20, Execution Team 2023-04-03
Participants:
Case:

 Description   

KeyString is normally stored with the record part when used for indexes. This allows parsing code to peek at the next byte.

This is not the case for clustered collections and we may get an Overflow error when parsing strings that may contain null. We are not actually reading out of bounds but the user facing error is wrong.



 Comments   
Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-72107 Check for remaining bytes when reading strings with Nuls
Branch: v6.0
https://github.com/mongodb/mongo/commit/341a343abdf8f0e43b06bb5910a939ec4dad4483

Comment by Githook User [ 29/Mar/23 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-72107 Check for remaining bytes when reading strings with Nuls
Branch: master
https://github.com/mongodb/mongo/commit/6eb96f7bbe3b9a60a06fd27c22157abb99f7a0a3

Generated at Thu Feb 08 06:20:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.