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

Coverity analysis defect 115379: Out-of-bounds read

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Labels:
    • ALL
    • Execution Team 2020-12-14

      Out-of-bounds read

      Incorrect values read from a different memory region will cause incorrect computations. Out-of-bounds read from a buffer
      /src/mongo/db/storage/key_string.cpp:693: OVERRUN 115379 Function call "mongo::countLeadingZeros64(integerPart << 1)" may return 64.
      /src/mongo/db/storage/key_string.cpp:693: OVERRUN 115379 Assigning: "fractionalBytes" = "mongo::countLeadingZeros64(integerPart << 1) / 8". The value of "fractionalBytes" is now 8.
      /src/mongo/db/storage/key_string.cpp:700: OVERRUN 115379 Overrunning array "mongo::KeyString::<unnamed>::kPow256" of 8 8-byte elements at element index 8 (byte offset 71) using index "fractionalBytes" (which evaluates to 8).

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: