[SERVER-79225] Failed SBE collection lookup can cause a null pointer dereference Created: 22/Jul/23  Updated: 29/Oct/23  Resolved: 09/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Mihai Andrei
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Sprint: QE 2023-09-18, QE 2023-10-02, QE 2023-10-16
Participants:

 Description   

MultipleCollectionAccessor::lookupCollection can return a null pointer when the collection is not found.  When this gets passed into an SBE generateCollScan call, this null pointer gets passed down to generateGenericCollScan and dereferenced (or generateClusteredCollScan and dereferenced), causing a null pointer exception.  This can happen with other 
getCurrentCollection calls as well; here is an example with generateIndexScan.



 Comments   
Comment by Githook User [ 06/Oct/23 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com', 'username': 'mtandrei'}

Message: SERVER-79225 Add tasserts protecting against invalid collection lookup
Branch: master
https://github.com/mongodb/mongo/commit/b5b45041d18d94f23de24b1b31fe9b30827c32b9

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