[SERVER-50328] enabling corruptDocumentOnInsert fail point causes heap-use-after-free violation Created: 15/Aug/20  Updated: 29/Oct/23  Resolved: 17/Aug/20

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

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-08-24
Participants:
Linked BF Score: 95

 Description   

validate_repair_mode.js and repair_corrupt_document.js use the corruptDocumentOnInsert fail point to trigger validation errors in the server. The fail point constructs a Record for RecordStore::insertRecords() that references a temporary buffer that is no longer in scope.

This issue is only present in the tests that use this fail point and does not impact production code.



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

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-50328 fix use-after-free error with corruptDocumentOnInsert fail point
Branch: master
https://github.com/mongodb/mongo/commit/f0f0779cc034ac59af1b8d749cc28b3d416a0299

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