Artifacts Associated With Ticket 41c9857bdd2d137b
Ticket change [80a2b7670c] (rid 184192) by kjnash on 2020-06-23 17:28:45:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
(I will patch the code myself shortly - this ticket is for reference.) Bug in library/init.tcl for Safe Base interpreters. The file library/init.tcl is sourced into the main interpreter, unsafe slave interpreters, and Safe Base slave interpreters. The file is not sourced into safe slave interpreters created by [interp create -safe foo]. In a Safe Base interpreter, the file is sourced by ::safe::interpCreate after it creates the safe slave. In a Safe Base interpreter, the elements of ::auto_path must be the tokenized directory names, e.g. {$p(:42:)}. The Safe Base interpreter is unable to use real directory names, and such information should not leak into the interpreter in any case. The current library/init.tcl permits such leakage. It appends the list elements . ./lib to ::auto_path. . is added as [file dirname $::tcl_library] ./lib is added as [file join [file dirname [file dirname [info nameofexecutable]]] lib] The best fix is not to allow safe interpreters to execute the code that sets auto_path in library/init.tcl. For a Safe Base slave interpreter, responsibility for initializing ::auto_path rests with the Safe Base and with the caller of ::safe::interpCreate, not with library/init.tcl. - foundin initialized to: "8.6 and above"
- is_private initialized to: "0"
- login: "kjnash"
- priority initialized to: "5 Medium"
- private_contact initialized to: "a774b1f5653dc3360e29ea7d635a64e94c9f1dab"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "kjnash"
- subsystem initialized to: "38. Init - Library - Autoload"
- title initialized to:
library/init.tcl adds nonsense to auto_path in Safe Base interpreters
- type initialized to: "Bug"
Ticket change [7efc592b80] (rid 184197) by kjnash on 2020-06-23 18:17:13:
- comment changed to:
(Fixed in core-8-6-branch commit be0c740944 - this ticket is for reference.) Bug in library/init.tcl for Safe Base interpreters. The file library/init.tcl is sourced into the main interpreter, unsafe slave interpreters, and Safe Base slave interpreters. The file is not sourced into safe slave interpreters created by [interp create -safe foo]. In a Safe Base interpreter, the file is sourced by ::safe::interpCreate after it creates the safe slave. In a Safe Base interpreter, the elements of ::auto_path must be the tokenized directory names, e.g. {$p(:42:)}. The Safe Base interpreter is unable to use real directory names, and such information should not leak into the interpreter in any case. The current library/init.tcl permits such leakage. It appends the list elements . ./lib to ::auto_path. . is added as [file dirname $::tcl_library] ./lib is added as [file join [file dirname [file dirname [info nameofexecutable]]] lib] The best fix is not to allow safe interpreters to execute the code that sets auto_path in library/init.tcl. For a Safe Base slave interpreter, responsibility for initializing ::auto_path rests with the Safe Base and with the caller of ::safe::interpCreate, not with library/init.tcl. - icomment:
Commit be0c740944 also unsets the variables tcl::Dir and tcl::Path used in library/init.tcl. These private variables are not documented in tclvars(n), and extensive grepping shows that they are not used by any other code.
- login: "kjnash"
- mimetype: "text/plain"
- comment changed to:
Ticket change [9e590d3f38] (rid 184381) by jan.nijtmans on 2020-07-08 14:36:40:
- closedate changed to: "2459039.10880677"
- closer changed to: "jan.nijtmans"
- login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"