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

blobAs() function results not validated

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

Details

    • Bug
    • Status: Resolved
    • Urgent
    • Resolution: Fixed
    • 2.0.10, 2.1.0
    • Legacy/CQL
    • None
    • Critical

    Description

      The results of the blobAs*() functions are not validated.

      Here are some examples:

      Non-type1 UUID inserted into timeuuid column:

      create table foo (k int primary key, v timeuuid);
      insert into foo (0, blobAsTimeuuid(0x00000000000000000000000000000000));
      

      Blob with length > 4 inserted into an int column:

      create table bar (k int primary key, v int);
      insert into bar (k, v) VALUES (0, blobAsInt(0x0000000000));
      

      Non-ascii characters inserted into an ascii column:

      create table baz (k int primary key, v ascii);
      insert into baz (k, v) VALUES (0, blobAsAscii(0xFFFFFFFF));
      

      Some of these (like the int column) could cause issues that look like corruption.

      Attachments

        Activity

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

          People

            slebresne Sylvain Lebresne Assign to me
            thobbs Tom Hobbs
            Sylvain Lebresne
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment