Overview
| Artifact ID: | 54fbc9b468166b386d4db87f1e11eb4a646df87e |
|---|---|
| Ticket: | 2835313fffffffffffffffffffffffffffffffff
crash in exception handling |
| User & Date: | dkf on 2013-10-20 18:41:35 |
Changes
- closedate changed to: "2456586.27888628"
- comment changed to:
% proc foo args {puts $args} % while 1 {foo 1 2 3 [continue] 5 6} Segmentation fault Also crashes 8.4.19, 8.3.5, 8.2.3, 8.1.0 Hangs 8.0.5 Something deep in the design of ExceptionRanges etc. just doesn't handle this right. - icomment:
Dealt with the <i>other</i> ways in which exceptions could be generated. Evilness abounded! <h2>Analysis</h2> <span style="float:left;font-size:700%;color:red;border-width:medium"><b>!</b></span> This was in fact one of the most serious bugs in Tcl's implementation that existed; it allowed a whole range of attacks against Tcl deployments that were impossible to guard against without totally crippling the language. I'm only willing to admit just how serious this was now that I've got code in place that makes the problem impossible to exploit, though it should be noted that a backport to 8.5 is definitely impossible. <p> <b>Execution of untrusted code in a critical environment will be <i>strongly recommended against</i> until Tcl 8.6.2</b>. This applies even in a safe interpreter. It is <i>not</i> believed possible to exploit this in any way other than forcing a process to hang or crash, as it is not possible for the attacker to control the locations of any values in Tcl or to force them to be placed at any known location. <h2>Mitigation Strategies</h2> A mitigation is to use a build of Tcl that has been configured with <tt>--enable-symbols=compile</tt>, as that will trap Tcl execution stack imbalances and convert them into definite crashes (i.e., a call to <tt>Tcl_Panic()</tt>); the disadvantage of that mechanism is that there is a substantial performance penalty. Code must also be written to cope with the process crashing (if desired), perhaps via a watchdog parent process; at the point where the problem is detected, insufficient information remains in the process to determine what the cause was.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "9 Immediate"
- severity changed to: "Critical"
- username: "dkf"