[SERVER-64734] Coverity analysis defect 121905: Freed internal location read Created: 21/Mar/22  Updated: 25/Mar/22  Resolved: 25/Mar/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Erwin Pe
Resolution: Won't Fix Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-03-21 at 10.44.13 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-63643 Generate implicit json schema for cre... Closed
Operating System: ALL
Sprint: Security 2022-04-04
Participants:

 Description   

Freed internal location read

Reading from freed memory can cause wrong values to be read and crashes due to illegal memory accesses. Reads target of a freed internal pointer
/src/mongo/db/matcher/implicit_validator.cpp:80: WRAPPER_ESCAPE 121905 Calling "back" which extracts wrapped state from "level->subobjs".
/src/mongo/db/matcher/implicit_validator.cpp:80: WRAPPER_ESCAPE 121905 Assigning: "level" = "level->subobjs.back()".
/src/mongo/db/matcher/implicit_validator.cpp:78: WRAPPER_ESCAPE 121905 Calling "push_back" invalidates the internal representation of "level->subobjs".
/src/mongo/db/matcher/implicit_validator.cpp:80: WRAPPER_ESCAPE 121905 Using invalidated internal representation of "level->subobjs".



 Comments   
Comment by Erwin Pe [ 25/Mar/22 ]

This is a false positive.

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