[SERVER-4691] mongod --auth crash during unauthenticated operation Created: 16/Jan/12  Updated: 08/Mar/13  Resolved: 21/Sep/12

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Romain Garbage Assignee: Spencer Brody (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD 9.0-STABLE FreeBSD 9.0-STABLE #1 r230142 amd64
mongodb-2.0.2
using spider monkey for javascript


Attachments: Text File mongod.log    
Operating System: FreeBSD
Participants:

 Description   

When trying to do an operation on a database without being authenticated when mongod is started with --auth flag, mongod crashes.

Example:

  1. mongo
    MongoDB shell version: 2.0.2
    connecting to: test
    > db.system.users.find()
    Mon Jan 16 19:20:36 DBClientCursor::init call() failed
    Mon Jan 16 19:20:36 query failed : test.system.users {} to: 127.0.0.1
    Error: error doing query: failed
    Mon Jan 16 19:20:36 trying reconnect to 127.0.0.1
    Mon Jan 16 19:20:36 reconnect 127.0.0.1 failed couldn't connect to server 127.0.0.1
    > exit
    bye
    mongo# /usr/local/etc/rc.d/mongod restart
    mongod not running?
    Starting mongod.
    forked process: 7424
    all output going to: /var/db/mongodb/mongod.log
    mongo# mongo
    MongoDB shell version: 2.0.2
    connecting to: test
    > db.auth('test','secret')
    1
    > db.system.users.find() { "_id" : ObjectId("4f10853a4292b966a9f08ef9"), "user" : "test", "readOnly" : false, "pwd" : "d42ffb4208a6ee4ef351cea495d01631" } { "_id" : ObjectId("4f1087f34292b966a9f08efa"), "user" : "patxi", "readOnly" : false, "pwd" : "3a43f2e323947ced066d82d4433281f7" }

Attached is a relevant part of mongod.log



 Comments   
Comment by Spencer Brody (Inactive) [ 10/Sep/12 ]

Just tested and could not reproduce with mongod version 2.2. Romain, can you try using 2.2 and see if you still have the same problem?

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