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

Explicitly check for NaN when setting log verbosities

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Security 2022-09-19, Security 2022-10-03, Security 2022-10-17, Security 2022-10-31, Security 2022-11-14

      Logging verbosity can be controlled via the logLevel and logComponentVerbosity server parameters. Both of these parameters can be set either at startup or at runtime and expect integers. During runtime, it's possible for a non-numeric value to be passed into the setParameter command invocations for these parameters. Directly coercing these values into integers results in undefined behavior based on the processor architecture. For Graviton/Arm64 in particular, this can result in the log level being silently set to 0, which corresponds to info-level logging, rather than being rejected as an invalid value.

      We should explicitly check for NaN/non-numeric values and reject them before attempting type coercion to int.

            Assignee:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: