Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15373

validate value sizes in LegacyLayout

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      In 2.1, all values are serialized as variable length blobs, with a length prefix, followed by the actual value, even with fixed width types like int32. The 3.0 storage engine, on the other hand, omits the length prefix for fixed width types. Since the length of fixed width types are not validated on the 3.0 write path, writing data for a fixed width type from an incorrectly sized byte buffer will over or underflow the space allocated for it, corrupting the remainder of that partition or indexed region from being read. This is not discovered until we attempt to read the corrupted value. This patch updates LegacyLayout to throw a marshal exception if it encounters an unexpected value size for fixed size columns.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bdeggleston Blake Eggleston Assign to me
            bdeggleston Blake Eggleston
            Blake Eggleston
            Benedict Elliott Smith, Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment