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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.9.0
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      64-bit FreeBSD
    • Operating System:
      FreeBSD

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            spencer Spencer Brody
            Reporter:
            brettkiefer Brett Kiefer
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: