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

Cache the value of the lsid from the opCtx when constructing the ARM

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      Currently, we propagate the value of the lsid in the AsyncResultsManager from the ARMParams because there are cases when the opCtx might be unavailable (i.e. if it's detached). However, this enables users to set an invalid value for the uid field of the lsid in the $mergeCursors stage and crash the server by triggering this invariant.

      While the invariant will be loosened to a tassert in SERVER-100901, we should also prevent the user from setting arbitrary lsid values in the $mergeCursors stage. While this is primarily used internally, we do support a createFromBson method in $mergeCursors and it is accessible to users. An automation agent that automatically copies and runs diagnostics on slow queries or a malicious actor should not be able to set the lsid here.

      Instead, we should cache the value of the lsid whe we construct the ARM in a member variable and propagate this to the getMore command request.

            Assignee:
            Unassigned Unassigned
            Reporter:
            lynne.wang@mongodb.com Lynne Wang
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: