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

Gracefully handle the demotion of data-types in umask

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.3, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Query Execution 2021-07-26, QE 2021-08-09
    • 35

      The Umask code in MozJS translates the input BSON to the type double. The double is then statically typed to the unsigned int (uint32). This could create a problem when the shell is run with the UBSAN and there is an integer overflow, ie. double has a value that does not find in 32 bits. The UBSAN would complain and crash the process.

      MozJS seems to translate any number type to double internally, we should clamp the value from double to integer safely as part of the fix.

            Assignee:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Reporter:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: