Gracefully handle the demotion of data-types in umask

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
            Reporter:
            Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: