Fix potential out of bounds read in __wt_session_get_btree_ckpt

XMLWordPrintableJSON

    • Storage Engines
    • 2023-05-16 Chook-n-Nuts Farm
    • 3
    • v7.0

      Coverity detected a potential out-of-bounds read and it does look like a real problem.

      Incorrect values read from a different memory region will cause incorrect computations. Out-of-bounds read from a buffer
      /src/third_party/wiredtiger/src/session/session_dhandle.c:404: OVERRUN 135341 Checking "cval.len == 0UL" implies that "cval.len" is at least 1 on the false branch.
      /src/third_party/wiredtiger/src/session/session_dhandle.c:496: OVERRUN 135341 Checking "cval.len > strlen("WiredTigerCheckpoint")" implies that "cval.len" is at least 21 on the true branch.
      /src/third_party/wiredtiger/src/session/session_dhandle.c:505: OVERRUN 135341 Overrunning array ""WiredTigerCheckpoint"" of 21 bytes at byte offset 21 using index "cval.len" (which evaluates to 21).

              Assignee:
              Monica Ng
              Reporter:
              Monica Ng
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: