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

ST_GeomFromGeoJSON does not control recursion depth

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Hide
      ST_GeomFromGeoJSON in processing its JSON object did not check the depth of processing and could potentially overrun memory. The depth of 32 is now enforced for MariaDB versions < 12.3, after which the depth is limited by the operating system stack size.
      Show
      ST_GeomFromGeoJSON in processing its JSON object did not check the depth of processing and could potentially overrun memory. The depth of 32 is now enforced for MariaDB versions < 12.3, after which the depth is limited by the operating system stack size.
    • Q3/2026 Server Maintenance, Q3/2026 Server Development

    Description

      SELECT ST_GeomFromGeoJSON(
        concat(
          repeat('{"type":"GeometryCollection","geometries":[', 2000),
          '{"type":"Point","coordinates":[0,0]}',
          repeat(']}', 2000)
        ));
      

      Reported by byteoverride

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.9h Original Estimate - 0.9h
                  0.9h
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2d 2h 40m
                  2d 2h 40m

                  Git Integration

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