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

validate value sizes in LegacyLayout

    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

          Activity

            People

            • Assignee:
              bdeggleston Blake Eggleston
              Reporter:
              bdeggleston Blake Eggleston
              Authors:
              Blake Eggleston
              Reviewers:
              Benedict Elliott Smith, Sam Tunnicliffe
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: