Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-24380

argument quoting/escaping broken in mesos cluster scheduler

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.2.0, 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: Deploy, Mesos
    • Labels:
      None

      Description

      When a configuration property contains shell characters that require quoting, the Mesos cluster scheduler generates the spark-submit argument like so:

      --conf "spark.mesos.executor.docker.parameters="label=logging=|foo|""

      Note the quotes around the property value as well as the key=value pair. When using docker, this breaks the spark-submit command and causes the "|" to be interpreted as an actual shell PIPE. Spaces, semi-colons, etc also cause issues.

      Although I haven't tried, I suspect this is also a potential security issue in that someone could exploit it to run arbitrary code on the host.

      My patch is pretty minimal and just removes the outer quotes around the key=value pair, resulting in something like:

      --conf spark.mesos.executor.docker.parameters="label=logging=|foo|"

      A more extensive fix might try wrapping the entire key=value pair in single quotes but I was concerned about backwards compatibility with that change.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                adobe_pmackles paul mackles
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: