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

[SBE] Fix use-after-free bug with $arrayElemAt, $first, and $last

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • 5.1.1, 5.2.0-rc1
    • 5.3.0, 5.1.2, 5.2.0-rc4
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.2, v5.1
    • QE 2021-12-27, QE 2022-01-10
    • 160

    Description

      A bug picked up by the agg wildcard fuzzer here. This bug can crash the server or cause a BufBuilder to hit the 64 MB memory limit. The investigator should look into the interplay between doing an $arrayElemAt where the input array is computed from a $setUnion and the index is a NumberDecimal or simply -1. I observed the server crash when using the NumberDecimal and the -1 caused the BufBuilder to run out of memory.

      Attachments

        Activity

          People

            andrew.paroski@mongodb.com Drew Paroski
            eric.cox@mongodb.com Eric Cox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: