Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3395

Searching for certain IDs on documents with indexed fields using the Mongoose driver can seg fault the mongodb server

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.8.1
    • Component/s: Querying
    • None
    • Environment:
      64-bit FreeBSD
    • FreeBSD

      Running this gist against MongoDB 1.8.1 on FreeBSD will crash the server
      https://gist.github.com/1071926

      Message is:
      Fri Jul 8 09:58:29 Invalid access at address: 0x801fffffa

      Fri Jul 8 09:58:29 Got signal: 11 (Segmentation fault: 11).

      Fri Jul 8 09:58:29 Backtrace:

      Fri Jul 8 09:58:29 Invalid access at address: 0x801b1c813

      Fri Jul 8 09:58:29 Got signal: 10 (Bus error: 10).

      Fri Jul 8 09:58:29 Backtrace:

      Repro:
      Install node.js
      Install npm
      npm install mongoose
      node crashMongo.js

      Expected:
      Bad query (because of the blank id)

      Observed:
      Server crashes

      My other test environment is MongoDB 1.6.5 on Linux, and it does not crash

      The driver is probably doing something incorrect, but I would expect the server to be robust against ill-formed queries.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            brettkiefer Brett Kiefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: