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

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0.17, 1.2.2, 1.3.2
    • 1.0.18, 1.2.3, 1.3.3, 1.4
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: