[SERVER-28996] MongoURI::connect can leak a DBClientInterface object on auth failure Created: 27/Apr/17  Updated: 30/Oct/23  Resolved: 01/May/17

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 3.2.12, 3.4.4, 3.5.6
Fix Version/s: 3.2.14, 3.4.5, 3.5.7

Type: Bug Priority: Critical - P2
Reporter: Andrew Morrow (Inactive) Assignee: Jonathan Reams
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:
v3.4, v3.2
Sprint: Platforms 2017-05-08
Participants:
Linked BF Score: 0

 Description   

If auth fails via an exception, the following code will leak a DBClientBase object:

https://github.com/mongodb/mongo/blob/v3.4/src/mongo/client/mongo_uri_connect.cpp#L180-L188



 Comments   
Comment by Githook User [ 24/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails

(cherry picked from commit cb893ef71d66bea22dd79553bd0080549f794c16)
Branch: v3.2
https://github.com/mongodb/mongo/commit/24353098bf91d2914ade05b305f3edc0cbe30c7c

Comment by Githook User [ 24/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails

(cherry picked from commit cb893ef71d66bea22dd79553bd0080549f794c16)
Branch: v3.2
https://github.com/mongodb/mongo/commit/24353098bf91d2914ade05b305f3edc0cbe30c7c

Comment by Githook User [ 17/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails

(cherry picked from commit cb893ef71d66bea22dd79553bd0080549f794c16)
Branch: v3.4
https://github.com/mongodb/mongo/commit/ae06aa4ec7137bb1e2688838d29dd778338a6393

Comment by Githook User [ 17/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails

(cherry picked from commit cb893ef71d66bea22dd79553bd0080549f794c16)
Branch: v3.4
https://github.com/mongodb/mongo/commit/ae06aa4ec7137bb1e2688838d29dd778338a6393

Comment by Githook User [ 01/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails
Branch: master
https://github.com/mongodb/mongo/commit/cb893ef71d66bea22dd79553bd0080549f794c16

Comment by Githook User [ 01/May/17 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-28996 SERVER-28996 Fix memory leak in MongoURI if auth fails
Branch: master
https://github.com/mongodb/mongo/commit/cb893ef71d66bea22dd79553bd0080549f794c16

Comment by Andrew Morrow (Inactive) [ 27/Apr/17 ]

This issue also affects v3.4 and v3.2. The 3.0 branch is unaffected.

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