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

blobAs() function results not validated

    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

        1. 7707.txt
          5 kB
          Sylvain Lebresne

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: