[tor-bugs] #16106 [Tor]: Sandbox causes crash when creating a hidden service through the control port
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Sep 4 09:59:50 UTC 2015
#16106: Sandbox causes crash when creating a hidden service through the control
port
--------------------------+------------------------------------------
Reporter: micahlee | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.7.x-final
Component: Tor | Version: Tor: 0.2.5.12
Resolution: | Keywords: TorCore201509, PostFreeze027
Actual Points: | Parent ID:
Points: |
--------------------------+------------------------------------------
Comment (by dgoulet):
I've worked on this one and here it is. In the branch below, I've made a
patch to allow tor to return an EACCES error and continue execution in
case of a bad syscall (for now, just for `open()`). This is good, we don't
exit abruptly *BUT* there is another issue here which is that
`options_act()` also makes us exit because we are unable to set the hidden
service properly. See this in `set_options()`:
{{{
if (options_act(old_options) < 0) { /* acting on the options failed.
die. */
log_err(LD_BUG,
"Acting on config options left us in a broken state. Dying.");
exit(1);
}
}}}
This is powerfully baked in tor right now, that is if an error occured on
a valid configuration option (here valid but unable to complete), tor will
exit everytime. Maybe it's time to change that function for which it could
return different error code and allow us to recover (especially with
options coming from the control port.)
I propose we split this ticket into two. One for a way to continue
execution for a bad syscall (see branch as a first PoC) and second one to
allow us to recover from good configuration options that went bad because
of OS restrictions for example.
Branch: `bug16106_027_01`.
That being said, for 0.2.7, this is getting a bit big so we should move
all of this for 0.2.8.
Thoughts?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16106#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list