Experimenting with Deploy ids and redeploys (specifically, I was looking for a delimiter to use in machine-generated deploy ids), I found that a Deploy id that Singulary's API accepted still crashed the Executor:
Failed to launch container: Failed to create container: Failed to chown: Failed to execute 'chown -R 0:0 '/mnt/mesos-slave/slaves/f38ff857-4831-46dc-b143-d8aaa0c44d06-S0/frameworks/Singularity/executors/github.com>opentable>sous-demo::ci-sf-<>|=()'_+{}"^&df1d7456ac654e4097ae451b0dc6c0fa-1485370286019-1-[REDACTED]-FIXME/runs/9967afcc-0feb-4421-baa7-094d6d8896fb'' (exit status: 512): Success; Abnormal executor termination
I'm concerned further that one explanation for this problem is that the ' ends the chown command, and the shell treats the rest as garbage. (I can only guess here: it looks like exec(commandString) rather than exec([array, of, command, parts])). If that's the case, there's the possibility of an RCE against Mesos agents for anyone with access to Singularity. It's tricky to test for this, because the restriction limits us to single word commands... like halt.
Experimenting with Deploy ids and redeploys (specifically, I was looking for a delimiter to use in machine-generated deploy ids), I found that a Deploy id that Singulary's API accepted still crashed the Executor:
Failed to launch container: Failed to create container: Failed to chown: Failed to execute 'chown -R 0:0 '/mnt/mesos-slave/slaves/f38ff857-4831-46dc-b143-d8aaa0c44d06-S0/frameworks/Singularity/executors/github.com>opentable>sous-demo::ci-sf-<>|=()'_+{}"^&df1d7456ac654e4097ae451b0dc6c0fa-1485370286019-1-[REDACTED]-FIXME/runs/9967afcc-0feb-4421-baa7-094d6d8896fb'' (exit status: 512): Success; Abnormal executor termination
I'm concerned further that one explanation for this problem is that the
'ends the chown command, and the shell treats the rest as garbage. (I can only guess here: it looks like exec(commandString) rather than exec([array, of, command, parts])). If that's the case, there's the possibility of an RCE against Mesos agents for anyone with access to Singularity. It's tricky to test for this, because therestriction limits us to single word commands... likehalt.