Mageia Bugzilla – Attachment 6163 Details for
Bug 15591
mongodb new security issue CVE-2015-1609
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
mongodb : Full testing procedure I used
mongodb_test.txt (text/plain), 3.16 KB, created by
olivier charles
on 2015-03-30 22:10:00 CEST
(
hide
)
Description:
mongodb : Full testing procedure I used
Filename:
MIME Type:
Creator:
olivier charles
Created:
2015-03-30 22:10:00 CEST
Size:
3.16 KB
patch
obsolete
># systemctl start mongod ># systemctl status mongod >mongod.service - High-performance, schema-free document-oriented database > Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled) > Active: active (running) since lun. 2015-03-30 21:21:01 CEST; 8s ago > >$ mongo >MongoDB shell version: 2.4.6 >connecting to: test >(...) >Server has startup warnings: >Mon Mar 30 21:21:01.293 [initandlisten] >Mon Mar 30 21:21:01.293 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary. >Mon Mar 30 21:21:01.293 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal). >Mon Mar 30 21:21:01.293 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off. >Mon Mar 30 21:21:01.293 [initandlisten] ** See http://dochub.mongodb.org/core/32bit >Mon Mar 30 21:21:01.293 [initandlisten] > >> db >test >> show dbs >local 0.03125GB >> use mydb >switched to db mydb >> db >mydb >> show log global >> show log startupWarnings >> j = { name : "mongo" } >{ "name" : "mongo" } >> k = { x : 3 } >{ "x" : 3 } >> db.testData.insert( j ) >> db.testData.insert( k ) >> show collections >system.indexes >testData >> db.testData.find() >{ "_id" : ObjectId("5519a38b6d2337e523eaaff8"), "name" : "mongo" } >{ "_id" : ObjectId("5519a3946d2337e523eaaff9"), "x" : 3 } >> for (var i = 1; i <= 25; i++) { >... db.testData.insert( { x : i } ) >... } >> db.testData.find() >{ "_id" : ObjectId("5519a38b6d2337e523eaaff8"), "name" : "mongo" } >{ "_id" : ObjectId("5519a3946d2337e523eaaff9"), "x" : 3 } >{ "_id" : ObjectId("5519a3e86d2337e523eaaffa"), "x" : 1 } >{ "_id" : ObjectId("5519a3e86d2337e523eaaffb"), "x" : 2 } >(...) >{ "_id" : ObjectId("5519a3e86d2337e523eab00b"), "x" : 18 } >Type "it" for more >> it >{ "_id" : ObjectId("5519a3e86d2337e523eab00c"), "x" : 19 } >(...) >{ "_id" : ObjectId("5519a3e86d2337e523eab012"), "x" : 25 } >> function insertData(dbName, colName, num) { > > var col = db.getSiblingDB(dbName).getCollection(colName); > > for (i = 0; i < num; i++) { > col.insert({x:i}); > } > > print(col.count()); > >} >> insertData("test", "testData", 400) >400 >> use test >switched to db test >> db.testData.find() >{ "_id" : ObjectId("5519a4b96d2337e523eab013"), "x" : 0 } >{ "_id" : ObjectId("5519a4b96d2337e523eab014"), "x" : 1 } >(...) >> db.testData.stats() >{ > "ns" : "test.testData", > "count" : 400, > "size" : 14420, > "avgObjSize" : 36.05, > "storageSize" : 86016, > "numExtents" : 3, > "nindexes" : 1, > "lastExtentSize" : 65536, > "paddingFactor" : 1, > "systemFlags" : 1, > "userFlags" : 0, > "totalIndexSize" : 24528, > "indexSizes" : { > "_id_" : 24528 > }, > "ok" : 1 >} >> var c = db.testData.find() >> while ( c.hasNext() ) printjson( c.next() ) >{ "_id" : ObjectId("5519a4b96d2337e523eab013"), "x" : 0 } >(...) >{ "_id" : ObjectId("5519a4b96d2337e523eab1a2"), "x" : 399 } >> var c = db.testData.find() >> printjson( c [ 4 ] ) >{ "_id" : ObjectId("5519a4b96d2337e523eab017"), "x" : 4 } >> use mydb >switched to db mydb >> db.dropDatabase(); >{ "dropped" : "mydb", "ok" : 1 } >> db.testData.find() >> use test >switched to db test >> db.dropDatabase(); >{ "dropped" : "test", "ok" : 1 } >> exit; > ># systemctl stop mongod
# systemctl start mongod # systemctl status mongod mongod.service - High-performance, schema-free document-oriented database Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled) Active: active (running) since lun. 2015-03-30 21:21:01 CEST; 8s ago $ mongo MongoDB shell version: 2.4.6 connecting to: test (...) Server has startup warnings: Mon Mar 30 21:21:01.293 [initandlisten] Mon Mar 30 21:21:01.293 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary. Mon Mar 30 21:21:01.293 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal). Mon Mar 30 21:21:01.293 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off. Mon Mar 30 21:21:01.293 [initandlisten] ** See http://dochub.mongodb.org/core/32bit Mon Mar 30 21:21:01.293 [initandlisten] > db test > show dbs local 0.03125GB > use mydb switched to db mydb > db mydb > show log global > show log startupWarnings > j = { name : "mongo" } { "name" : "mongo" } > k = { x : 3 } { "x" : 3 } > db.testData.insert( j ) > db.testData.insert( k ) > show collections system.indexes testData > db.testData.find() { "_id" : ObjectId("5519a38b6d2337e523eaaff8"), "name" : "mongo" } { "_id" : ObjectId("5519a3946d2337e523eaaff9"), "x" : 3 } > for (var i = 1; i <= 25; i++) { ... db.testData.insert( { x : i } ) ... } > db.testData.find() { "_id" : ObjectId("5519a38b6d2337e523eaaff8"), "name" : "mongo" } { "_id" : ObjectId("5519a3946d2337e523eaaff9"), "x" : 3 } { "_id" : ObjectId("5519a3e86d2337e523eaaffa"), "x" : 1 } { "_id" : ObjectId("5519a3e86d2337e523eaaffb"), "x" : 2 } (...) { "_id" : ObjectId("5519a3e86d2337e523eab00b"), "x" : 18 } Type "it" for more > it { "_id" : ObjectId("5519a3e86d2337e523eab00c"), "x" : 19 } (...) { "_id" : ObjectId("5519a3e86d2337e523eab012"), "x" : 25 } > function insertData(dbName, colName, num) { var col = db.getSiblingDB(dbName).getCollection(colName); for (i = 0; i < num; i++) { col.insert({x:i}); } print(col.count()); } > insertData("test", "testData", 400) 400 > use test switched to db test > db.testData.find() { "_id" : ObjectId("5519a4b96d2337e523eab013"), "x" : 0 } { "_id" : ObjectId("5519a4b96d2337e523eab014"), "x" : 1 } (...) > db.testData.stats() { "ns" : "test.testData", "count" : 400, "size" : 14420, "avgObjSize" : 36.05, "storageSize" : 86016, "numExtents" : 3, "nindexes" : 1, "lastExtentSize" : 65536, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 0, "totalIndexSize" : 24528, "indexSizes" : { "_id_" : 24528 }, "ok" : 1 } > var c = db.testData.find() > while ( c.hasNext() ) printjson( c.next() ) { "_id" : ObjectId("5519a4b96d2337e523eab013"), "x" : 0 } (...) { "_id" : ObjectId("5519a4b96d2337e523eab1a2"), "x" : 399 } > var c = db.testData.find() > printjson( c [ 4 ] ) { "_id" : ObjectId("5519a4b96d2337e523eab017"), "x" : 4 } > use mydb switched to db mydb > db.dropDatabase(); { "dropped" : "mydb", "ok" : 1 } > db.testData.find() > use test switched to db test > db.dropDatabase(); { "dropped" : "test", "ok" : 1 } > exit; # systemctl stop mongod
View Attachment As Raw
Actions:
View
Attachments on
bug 15591
: 6163