[SERVER-18111] mongod allows user inserts into system.profile collection Created: 17/Apr/15  Updated: 28/Oct/15  Resolved: 28/Apr/15

Status: Closed
Project: Core Server
Component/s: Storage, Write Ops
Affects Version/s: 3.0.0
Fix Version/s: 2.6.10, 3.0.3, 3.1.3

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-18107 Crash on mongorestore with system.pro... Closed
Related
is related to SERVER-18112 mongod replicates operations on syste... Closed
is related to SERVER-11611 remove DataFileMgr::insert* Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Completed:
Sprint: Quint Iteration 3
Participants:

 Description   

mongod allows user inserts into system.profile collection. This is a regression introduced in version 2.5.5 by be828115 (SERVER-11611).

To illustrate, see the following shell session with mongod version 2.5.5:

> db.system.profile.insert({x:1})
> db.system.profile.find({x:1})
{ "_id" : ObjectId("55319438a236ac0c4bd8f010"), "x" : 1 }

And, the expected behavior with mongod version 2.5.4:

> db.system.profile.insert({x:1})
attempt to insert in system namespace 'test.system.profile'

User operations that insert, modify, or remove documents (including the "renameCollection" command) should be forbidden on "system.profile".

Create and drop operations should remain allowed on "system.profile", and convertToCapped should remain allowed as well.



 Comments   
Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in cloneCollection cmd parsing

(cherry picked from commit 301f6a927294d542f5466e4704d37f8e930d5317)
Branch: v2.6
https://github.com/mongodb/mongo/commit/abc4c40d6859d3594a41135ee20a87982d111fc7

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in findAndModify cmd parsing

(cherry picked from commit 4ea827d383156d36e666d05eb6dad8bbc2a75801)
Branch: v2.6
https://github.com/mongodb/mongo/commit/7a2b2614d8a786de848ada2c42e74276d887df13

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Forbid most user operations against "system.profile"

Forbids user writes to "system.profile". Notably, this also prevents
"system.profile" from being used as a source or target from
renameCollection.

Creation, drop, and capped conversion of "system.profile" remain
allowed.

(cherry picked from commit 659d6c26e12d3396aafff70ca11d74a4187b4084)
Branch: v2.6
https://github.com/mongodb/mongo/commit/e5ee7906615bae2824a838bd23f226b6cbdb9ff2

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in cloneCollection cmd parsing

(cherry picked from commit fdfd8e79061f9ea12840875290d159dfafdcbc96)
Branch: v3.0
https://github.com/mongodb/mongo/commit/301f6a927294d542f5466e4704d37f8e930d5317

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in findAndModify cmd parsing

(cherry picked from commit 040879f6885395ab49754bd76449af71d0903dd7)
Branch: v3.0
https://github.com/mongodb/mongo/commit/4ea827d383156d36e666d05eb6dad8bbc2a75801

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Forbid most user operations against "system.profile"

Forbids user writes to "system.profile". Notably, this also prevents
"system.profile" from being used as a source or target from
renameCollection.

Creation, drop, and capped conversion of "system.profile" remain
allowed.

(cherry picked from commit 5b80159eeb2332a5e8e79e30de27c2dd72c30a18)
Branch: v3.0
https://github.com/mongodb/mongo/commit/659d6c26e12d3396aafff70ca11d74a4187b4084

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in cloneCollection cmd parsing
Branch: master
https://github.com/mongodb/mongo/commit/fdfd8e79061f9ea12840875290d159dfafdcbc96

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Check userAllowedWriteNS() in findAndModify cmd parsing
Branch: master
https://github.com/mongodb/mongo/commit/040879f6885395ab49754bd76449af71d0903dd7

Comment by Githook User [ 28/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-18111 Forbid most user operations against "system.profile"

Forbids user writes to "system.profile". Notably, this also prevents
"system.profile" from being used as a source or target from
renameCollection.

Creation, drop, and capped conversion of "system.profile" remain
allowed.
Branch: master
https://github.com/mongodb/mongo/commit/5b80159eeb2332a5e8e79e30de27c2dd72c30a18

Generated at Thu Feb 08 03:46:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.