[SERVER-51853] Always initialize the numInserted out-parameter in AbstractIndexAccessMethod::insertKeys Created: 27/Oct/20  Updated: 29/Oct/23  Resolved: 28/Oct/20

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.2, 4.2.11

Type: Bug Priority: Major - P3
Reporter: Bernard Gorman Assignee: Bernard Gorman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Sprint: Query 2020-11-02
Participants:
Linked BF Score: 46

 Description   

Callers may pass an uninitialized int64 value as an out-parameter to AbstractIndexAccessMethod::insertKeys. In cases where the method returns early with an exception, this can result in the random contents of the int64 being added to the OpDebug metrics.



 Comments   
Comment by Githook User [ 29/Oct/20 ]

Author:

{'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com', 'username': 'gormanb'}

Message: SERVER-51853 Always initialize the numInserted out-parameter in AbstractIndexAccessMethod::insertKeys

(cherry picked from commit 8177334703d89a19f38246c5ca95cbf3e5470d91)
Branch: v4.2
https://github.com/mongodb/mongo/commit/022d093fdba4f4b617c80048971ba6b3a6ad386a

Comment by Githook User [ 28/Oct/20 ]

Author:

{'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com', 'username': 'gormanb'}

Message: SERVER-51853 Always initialize the numInserted out-parameter in AbstractIndexAccessMethod::insertKeys

(cherry picked from commit 8177334703d89a19f38246c5ca95cbf3e5470d91)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b5fafa1f87dda6f8773c5a8a1a5e7776d4d94da7

Comment by Githook User [ 28/Oct/20 ]

Author:

{'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com', 'username': 'gormanb'}

Message: SERVER-51853 Always initialize the numInserted out-parameter in AbstractIndexAccessMethod::insertKeys
Branch: master
https://github.com/mongodb/mongo/commit/8177334703d89a19f38246c5ca95cbf3e5470d91

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