Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2980869eab3e70de787a0438d30946dbaa3cc33291d0440130c2507cdbb5bfe9
Ticket: a47b5874991375da39724508e8ae84b6002f5315
zipfs should not be available to safe interps
User & Date: apnadkarni on 2023-09-10 08:14:18
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    zipfs mounted archives should be subject to same safe interp restrictions for file system access as native files. However, the exists and info commands are allowed.
    
    ```
    % set safe [interp create -safe]
    interp0
    % interp0 eval {zipfs mount}
    not allowed to invoke subcommand mount of zipfs
    % interp0 eval {zipfs exists //zipfs:/test/test}
    1
    % interp0 eval {zipfs info //zipfs:/test/test}
    D:/src/tcltk/wip/tcl/tests/zipfiles/test.zip 5 5 55
    ```
    
    TIP 430 says specifically *Unlike _file exists_ this command is safe
    to run in a safe interp, because it confers no access to the local file
    system.*
    
    This does not make sense to me. Local file system is not the only resource that should be protected. An application may choose to store any kind of information within an archive and these should be afforded the same level of protection from malicious code in safe interps as for native file systems. If `exists` is not allowed for the latter, `zipfs exists|info` should not be allowed either for archives.
    
  5. foundin changed to: "8.7"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "zipfs should not be available to safe interps"
  16. type changed to: "Bug"