Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-38372

ASAN error in InnoDB on malformed WKB

    XMLWordPrintable

Details

    • Can result in hang or crash
    • malformed spatial data could've caused a crash inside InnoDB

    Description

      source include/have_innodb.inc;
       
      create table t1 (
          id int auto_increment primary key,
          geom geometry not null,
          spatial index (geom)
      ) engine=innodb;
       
      SET @wkb = CONCAT(
          UNHEX('00000000'), # SRID = 0 (4 bytes)
          UNHEX('01'),       # byte_order = 1 (little-endian, 1 byte)
          UNHEX('07000000'), # type = 7 (GeometryCollection, 4 bytes)
          UNHEX('FF000000')  # n_items = 255 (claims 255 geometries, but NONE follow)
      );
      select hex(@wkb);
      insert t1 (geom) values (@wkb);
      drop table t1;

      Reported by Pavel Kohout, Aisle Research

      Attachments

        Activity

          People

            serg Sergei Golubchik
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.