Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-23

bugzillaId-553: maxadmin cmdline arg command vs. filename ambiguity - a potential security issue?

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.0.0
    • 2.2.0
    • maxadmin
    • None
    • Linux
    • 2017-31

    Description

      This is imported from bugzilla item: http://bugs.mariadb.com/show_bug.cgi?id=553

      The fix version in bugzilla shows "commit 5cfbfe39ac942e406de719612257ef797dca9c7f"

      Hartmut Holzgraefe 2014-09-22 18:15:46 UTC
      After parsing options maxadmin takes the remaining command line argument(s), first checks if these match a readable file name and executes commands from this file, or takes the extra argument(s) as literal maxadmin commands ...

      Problem is that a file name can be the same as a maxadmin command, e.g.:

      echo list clients > list\ servers
      maxadmin ... list servers

      will list clients, not servers, as "list servers" is now a valid, readable file ....

      While it's unlikely that someone names files like this by accident it may be an attack vector for maliciously changing the behaviour of maxscale invocations with comdline commands ...

      proposed fix:

      1) either have an explicit "f|-command-file FILENAME" option

      2) or do not support giving a file name at all, just rely on input redirection, e.g.:

      maxadmin ... < cmdfile.txt

      instead of

      maxadmin ... cmdfile.txt

      The "mysql" command line client takes the 2nd approach, so that's probably what
      maxadmin should be doing, too?

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            hholzgra Hartmut Holzgraefe
            Votes:
            1 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.