[SERVER-43879] OplogInterfaceLocal::next should return an owned BSON obj Created: 08/Oct/19  Updated: 29/Oct/23  Resolved: 08/Oct/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.4.0, 3.6.0, 4.0.0, 4.2.0
Fix Version/s: 4.3.1, 3.4.24, 4.0.14

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

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6, v3.4
Sprint: Execution Team 2019-10-21
Participants:

 Description   

OplogInterfaceLocal::next() returns an unowned BSONObj. This is problematic because callers in RollBackLocalOperations::onRemoteOperation() save the resulting object and call next() several times without taking ownership first. This results in a bugs where an unowned BSONObj can point to freed or overwritten memory.



 Comments   
Comment by Githook User [ 31/Oct/19 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah.schvimer@10gen.com'}

Message: SERVER-43879 OplogInterfaceLocal::next should return an owned BSON obj

(cherry picked from commit 11cc6bd375b1a6089047a44909efb9cb4d1ad97e)
Branch: v4.0
https://github.com/mongodb/mongo/commit/6488883c472556282a7a1bfa1ded079ada3a6820

Comment by Githook User [ 30/Oct/19 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah.schvimer@10gen.com'}

Message: SERVER-43879 OplogInterfaceLocal::next should return an owned BSON obj

(cherry picked from commit 11cc6bd375b1a6089047a44909efb9cb4d1ad97e)
Branch: v4.2
https://github.com/mongodb/mongo/commit/18fbbb89ade4f96da64a29c274e305f3a17e59f1

Comment by Githook User [ 30/Oct/19 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah.schvimer@10gen.com'}

Message: SERVER-43879 OplogInterfaceLocal::next should return an owned BSON obj

(cherry picked from commit 11cc6bd375b1a6089047a44909efb9cb4d1ad97e)
Branch: v3.6
https://github.com/mongodb/mongo/commit/18934fb5c814e87895c5e38ae1515dd6cb4c00f7

Comment by Githook User [ 30/Oct/19 ]

Author:

{'username': 'judahschvimer', 'email': 'judah.schvimer@10gen.com', 'name': 'Judah Schvimer'}

Message: SERVER-43879 OplogInterfaceLocal::next should return an owned BSON obj

(cherry picked from commit 11cc6bd375b1a6089047a44909efb9cb4d1ad97e)
Branch: v3.4
https://github.com/mongodb/mongo/commit/edf22ddd2963839b50a658c43532e1742caeefc2

Comment by Githook User [ 08/Oct/19 ]

Author:

{'name': 'Louis Williams', 'username': 'louiswilliams', 'email': 'louis.williams@mongodb.com'}

Message: SERVER-43879 OplogInterfaceLocal::next should return an owned BSON obj
Branch: master
https://github.com/mongodb/mongo/commit/11cc6bd375b1a6089047a44909efb9cb4d1ad97e

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