Skip to content
Tcl Source Code Artifact [7ebe656be1]
Login

Artifact [7ebe656be1]

Artifact 7ebe656be15ad6f51a69eb57725eec5eaba334ad3b51215305c7a3a0d8244b8c:

Ticket change [7ebe656be1] - Ticket [21b0629c81fbe38a|21b0629c81] <i>0-day vulnerability - insufficient escape by exec of batch-files for windows</i> status still Pending with 3 other changes by sebres on 2018-08-20 18:08:01.
D 2018-08-20T18:08:01.782
J icomment Although\sthis\sfixed\sthe\sissue,\sat\sthe\ssame\stime\sit\sis\sa\sbit\sincompatible\sif\swanted\s"raw"\s(not\sescaped)\sarguments,<br/>\sfor\sexample\sby\sinvocation\sof\s<code>cmd\s/c\s...something\sraw,\sbecause\sscript...</code>\r\n\r\nSearch\sfor\sexec\sin\sown\s(as\swell\sas\smany\sopen\ssource)\sprojects,\sshows\sme\salmost\snever\sthe\susage\sof\s"raw"\sarguments\sas\sexpected\scase.\sIn\scontrary,\smany\sinvocation's\sof\s<code>cmd\s/c</code>\sexpecting\salso\sthat\sarguments\sare\sescaped\sproperly.<br/>\r\nLet\salone\sreal\sraw\sdata\swere\sanyway\simpossible\s(because\spreviously\spartially\sescaped\salso).\r\n\r\nTherefore\s(and\sbecause\sthis\sfixed\sa\sgrave\s0-day\svulnerability),\sthe\sdefault\sescape\sshould\stake\splace\sas\sit\sis\simplemented\sin\s0-day-21b0629c81.\r\n\r\nBut\sperhaps,\sjust\sto\sprovide\sthe\sdeveloper\sa\spossibility\sto\sinvoke\s<code>cmd\s/c</code>\swith\sraw-unescaped\sscripts\s(e.\sg.\ssomething\senclosed\sin\s2x\sdouble-quoted\sblock,\slike\s<code>cmd\s/c\s""...raw-script...""</code>\setc.),\sI\ssuggest\sto\sextend\s"exec"\swith\snew\soption\s"-raw".\r\n<code><pre\sstyle="padding-left:\s10pt">\r\nexec\s-raw\scmd\s/c\s""...raw-script-dev-want-escape-independent...""\r\n</pre></code>\r\nFor\s*unix-platforms\sthis\scan\sbe\ssimply\signored,\sbut\sI\sassume\sit\swill\sbe\sanyway\sused\swith\s<code>exec\scmd</code>\sonly,\sso\salready\sencapsulated\sinto\s<code>if\s{$::tcl_platform(platform)\seq\s"windows"}\s{exec\s-raw\scmd\s...}</code>.
J login sebres
J mimetype text/x-fossil-wiki
K 21b0629c81fbe38ad153cd8fd899626200a66e15
U sebres
Z 213cda189fa37b639ad1d381d24b17af