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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 5.3.0, 5.1.2, 5.2.0-rc4
    • Affects Version/s: 5.1.1, 5.2.0-rc1
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.2, v5.1
    • QE 2021-12-27, QE 2022-01-10
    • 160

      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.

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

              Created:
              Updated:
              Resolved: