Artifacts Associated With Ticket 2000565
Ticket change [330b2300ab] (rid 106515) by lars_h on 2008-06-23 08:06:51:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
It seems the -level option of [return] has the power to cross interpreter boundaries, even that from a safe interpreter to its master: % info patchlevel 8.5.2 % interp create -safe test test % catch {test eval {return -level 3 foo}} res info 2 % set res foo % set info -code 0 -level 2 Doesn't this constitute a security hole? If we have a proc like proc eval_and_check {script} { set res [interp slave eval $script] validate_res_allowed $res return $res } then the $script can fool the caller of [eval_and_check] to accept anything by [return]ing it at the level of [eval_and_check]. - foundin initialized to: "obsolete: 8.5.2"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "lars_h"
- subsystem initialized to: "20. [interp]"
- title initialized to: "return -level not caught at safe interp boundary"
- type initialized to: "Bug"
Ticket change [7dd08e5f4e] (rid 97298) by dkf on 2008-06-23 15:12:25:
- assignee changed to: "dgp"
- priority changed to: "8"
Ticket change [61ef16da8b] (rid 92326) by dgp on 2008-06-23 21:34:13:
- closedate changed to: "2008-06-23T14:34:13"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: NO Adding [return -level] did not add any new security concerns. Tcl 8.4 already had [return -code return]: % info patch 8.4.19 % interp create slave slave % catch {slave eval {return -code return}} m 2 If you permit a slave interp to evaluate an unknown, untrusted script, you must [catch] the evaluation, and be prepared to handle any return code it might throw back at you. That's been true as long as there have been slave interps. - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dgp"