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

JSON Schema parser and MatchExpressions must gracefully handle nested schemas

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • Query Optimization
    • Query 2017-10-02

    Description

      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

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: