[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #26374 [Core Tor/Tor]: MacOS Sandbox



#26374: MacOS Sandbox
--------------------------+----------------------------------
 Reporter:  ahf           |          Owner:  (none)
     Type:  enhancement   |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor  |        Version:  Tor: unspecified
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+----------------------------------

Comment (by rl1987):

 We should do some design work to decide how this should be implemented and
 how we want TBB et. al. to interact with sandboxed tor(1).

 The contents of sandbox profile will largely depend on configuration in
 torrc - we allow and deny file/network/OS operations based on
 configuration. Changing configuration would require changing sandbox
 profile.

 We could implement a command line argument that generates SBPL file from
 tor configuration without actually starting tor, e.g.:
 {{{
 tor --generate-sbpl tor.sb
 }}}

 Then the user (or TorBrowser.app) would launch tor (with same config)
 through sandbox-exec(1):
 {{{
 sandbox-exec -f tor.sb tor
 }}}

 There's libseccomp-based Linux sandboxing code in tor codebase already.
 Ideally we would want macOS code to be consistent with existing stuff in
 sandbox.c and perhaps reuse some of the logic.

 Note that `sandbox_init()` C function is deprecated in modern macOS. So we
 probably shouldn't write code that sandboxes tor from inside process.
 Furthermore, Apple does seem to want 3rd party developers to use SBPL.
 Instead, they want everyone to use Xcode to configure what a program is
 and isn't allowed to do (not sure if we want to go that way - I would
 prefer the above approach).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26374#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs