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

DiskLoc56Bit::Z accesses bytes not owned by current DiskLoc56Bit object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.2
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      In https://github.com/mongodb/mongo/blob/57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5/src/mongo/db/btree.h#L194

      DiskLoc56Bit::Z does an 8 byte read from a reinterpret_cast'ed this pointer. However, a DiskLoc56Bit is only 7 bytes long, so this is undefined behavior.

      The 'Z' method should be rewritten to only access the bytes owned by the current DiskLoc56Bit.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: