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

ambiguous view frm parsing when username includes \n

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Views now escape user names in the view frm file; old views where the definer name included a backslash will need to be recreated

    Description

      create user 'root
      definer_host=localhost
      suid=1'@localhost;
       
      --connect u,localhost,'root
      definer_host=localhost
      suid=1';
       
      --error ER_TABLEACCESS_DENIED_ERROR
      select group_concat(user,'@',host) from mysql.global_priv;
       
      create function f() returns text sql security invoker
        return (select group_concat(user,'@',host) from mysql.global_priv);
       
      create view v as select f();
       
      select * from v;
      

      Reported by Ben Bidner (Automattic.com Security Team).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Git Integration

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