[SERVER-50309] Fix use-after-move in buildMultiPlan Created: 14/Aug/20  Updated: 29/Oct/23  Resolved: 14/Aug/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Justin Seyster Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2020-08-24
Participants:

 Description   

This code can result in a nullptr dereference, depending on the order that the parameters to buildExecutableTree are evaluated.

buildExecutableTree(*solutions[ix], true), std::move(solutions[ix])

https://github.com/mongodb/mongo/blob/e908bb6b444235cb251c4e69b5adac9e6a983953/src/mongo/db/query/get_executor.cpp#L945



 Comments   
Comment by Githook User [ 14/Aug/20 ]

Author:

{'name': 'Justin Seyster', 'email': 'justin.seyster@mongodb.com', 'username': 'jseyster'}

Message: SERVER-50309 Fix use-after-move in buildMultiPlan
Branch: master
https://github.com/mongodb/mongo/commit/d6183f94ebb21465ce1a148a58b214b32804b47e

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