Skip to content
Tcl Source Code Artifact [54fbc9b468]
Login

Artifact [54fbc9b468]

Artifact 54fbc9b468166b386d4db87f1e11eb4a646df87e:

Ticket change [54fbc9b468] - Ticket [2835313fffffffff|2835313fff] <i>crash in exception handling</i> status still Closed with 8 other changes by dkf on 2013-10-20 18:41:35.
D 2013-10-20T18:41:35.775
J closedate 2456586.27888628
J comment %\sproc\sfoo\sargs\s{puts\s$args}\r\n%\swhile\s1\s{foo\s1\s2\s3\s[continue]\s5\s6}\r\nSegmentation\sfault\r\n\r\nAlso\scrashes\s8.4.19,\s8.3.5,\s8.2.3,\s8.1.0\r\n\r\nHangs\s8.0.5\r\n\r\nSomething\sdeep\sin\sthe\sdesign\sof\r\nExceptionRanges\setc.\sjust\sdoesn't\r\nhandle\sthis\sright.
J icomment Dealt\swith\sthe\s<i>other</i>\sways\sin\swhich\sexceptions\scould\sbe\sgenerated.\sEvilness\sabounded!\r\n<h2>Analysis</h2>\r\n<span\sstyle="float:left;font-size:700%;color:red;border-width:medium"><b>!</b></span>\r\nThis\swas\sin\sfact\sone\sof\sthe\smost\sserious\sbugs\sin\sTcl's\simplementation\sthat\sexisted;\sit\sallowed\sa\swhole\srange\sof\sattacks\sagainst\sTcl\sdeployments\sthat\swere\simpossible\sto\sguard\sagainst\swithout\stotally\scrippling\sthe\slanguage.\sI'm\sonly\swilling\sto\sadmit\sjust\show\sserious\sthis\swas\snow\sthat\sI've\sgot\scode\sin\splace\sthat\smakes\sthe\sproblem\simpossible\sto\sexploit,\sthough\sit\sshould\sbe\snoted\sthat\sa\sbackport\sto\s8.5\sis\sdefinitely\simpossible.\r\n<p>\r\n<b>Execution\sof\suntrusted\scode\sin\sa\scritical\senvironment\swill\sbe\s<i>strongly\srecommended\sagainst</i>\suntil\sTcl\s8.6.2</b>.\sThis\sapplies\seven\sin\sa\ssafe\sinterpreter.\sIt\sis\s<i>not</i>\sbelieved\spossible\sto\sexploit\sthis\sin\sany\sway\sother\sthan\sforcing\sa\sprocess\sto\shang\sor\scrash,\sas\sit\sis\snot\spossible\sfor\sthe\sattacker\sto\scontrol\sthe\slocations\sof\sany\svalues\sin\sTcl\sor\sto\sforce\sthem\sto\sbe\splaced\sat\sany\sknown\slocation.\r\n<h2>Mitigation\sStrategies</h2>\r\nA\smitigation\sis\sto\suse\sa\sbuild\sof\sTcl\sthat\shas\sbeen\sconfigured\swith\s<tt>--enable-symbols=compile</tt>,\sas\sthat\swill\strap\sTcl\sexecution\sstack\simbalances\sand\sconvert\sthem\sinto\sdefinite\scrashes\s(i.e.,\sa\scall\sto\s<tt>Tcl_Panic()</tt>);\sthe\sdisadvantage\sof\sthat\smechanism\sis\sthat\sthere\sis\sa\ssubstantial\sperformance\spenalty.\sCode\smust\salso\sbe\swritten\sto\scope\swith\sthe\sprocess\scrashing\s(if\sdesired),\sperhaps\svia\sa\swatchdog\sparent\sprocess;\sat\sthe\spoint\swhere\sthe\sproblem\sis\sdetected,\sinsufficient\sinformation\sremains\sin\sthe\sprocess\sto\sdetermine\swhat\sthe\scause\swas.
J login dkf
J mimetype text/html
J priority 9\sImmediate
J severity Critical
J username dkf
K 2835313fffffffffffffffffffffffffffffffff
U dkf
Z cd4d922c4e41aac328d0c9a7aaa8c940