Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3105

SegmentWriter doesn't properly check the length of external blob IDs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.17, 1.2.2, 1.3.2
    • Fix Version/s: 1.0.18, 1.2.3, 1.3.3, 1.4
    • Component/s: None
    • Labels:
      None

      Description

      To store the length field of an external binary ID, the following encoding is used:

      1110 + 4bit + 8bit
      

      which allows to store numbers between 0 and 212 - 1.

      The current implementation of SegmentWriter allows the length of binary IDs to range between 0 and 213 - 1, writing incorrect data when the length of the binary ID ranges from 212 to 213 - 1.

      When reading this incorrect data back, an IllegalStateException is thrown complaining that the first byte of the length fields has an unexpected value record type. See OAK-1842 for an example.

        Attachments

        1. OAK-3105-01.patch
          6 kB
          Francesco Mari

          Issue Links

            Activity

              People

              • Assignee:
                mduerig Michael Dürig
                Reporter:
                frm Francesco Mari
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: