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

JSON Schema parser and MatchExpressions must gracefully handle nested schemas

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Query Optimization
    • Query 2017-10-02

      It seems that the JSON Schema parser is susceptible to stack overflow if given a sufficiently nested schema. We definitely can't allow the server to crash when parsing a schema, so recursion must be limited in some fashion.

      Reproduction steps vary based on the hardware of the machine, but this schema was able to trigger it at least once on my workstation: https://gist.github.com/ksuarz/d5caa6fc8a9fb003e22cf92eb78596a4

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: