Skip to content
Tcl Source Code History Of Ticket a47b587499
Login

History Of Ticket a47b587499

Artifacts Associated With Ticket a47b587499

  1. Ticket change [2980869eab] (rid 217919) by apnadkarni on 2023-09-10 08:14:18:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized 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 initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to: "zipfs should not be available to safe interps"
    16. type initialized to: "Bug"
  2. Ticket change [9837ff72d8] (rid 229687) by tberg on 2024-08-02 22:06:54:

    1. icomment:
      I agree. If `file exists` is not allowed, the rationale is that safe interpreters should not be able to see whether a specific file exists or not. Whether the file is on disk or in an attached ZIP should not make any difference.
      
      Rather the opposite seems true. An attached ZIP is likely to contain files critical for the execution of the program. So, it could be considered dangerous allowing to see them as this might open the door for manipulations. And ... as they cannot be mounted and thus read anyway, why would you want to check for their existence?
      
    2. login: "tberg"
    3. mimetype: "text/x-markdown"
  3. Ticket change [684c176b9c] (rid 229713) by apnadkarni on 2024-08-04 05:37:30:

    1. icomment:
      My inclination is to remove zipfs completely from safe interps. All commands leak file system information of one kind or another.
      
      Proposed implementation is in branch bug-a47b587499.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  4. Ticket change [5094443352] (rid 229738) by apnadkarni on 2024-08-05 13:43:17:

    1. icomment: "Merged into zipfs-consolidation branch."
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [abfcd9e183] (rid 230153) by apnadkarni on 2024-08-16 07:23:02:

    1. closedate changed to: "2460538.80766269"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Fixed in [d4dd94ab5c]. zipfs no longer available in safe interps.
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"