[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #20860 [Core Tor/Tor]: Regression breaks 'SETCONF HiddenServiceDir'
#20860: Regression breaks 'SETCONF HiddenServiceDir'
--------------------------+----------------------------------------
Reporter: atagar | Owner:
Type: defect | Status: needs_review
Priority: Very High | Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor | Version: Tor: 0.3.0.0-alpha-dev
Severity: Major | Resolution:
Keywords: tor-hs | Actual Points: 0.4
Parent ID: | Points: 0.1
Reviewer: | Sponsor:
--------------------------+----------------------------------------
Changes (by teor):
* status: new => needs_review
* actualpoints: => 0.4
Comment:
(The directory creation appears unnecessary, the crash occurs regardless
for me.)
Please see my branch bug20860-v3 on https://github.com/teor2345/tor.git
The root cause of this bug is that some checks were only getting performed
when we acted on the options, and not during validation. This is
problematic, because if tor passes validation but fails when acting on
options, it asserts and dies.
This patch resolves this issue by performing more of the checks during
validation.
Now the results are:
{{{
SETCONF HiddenServiceDir="/tmp/hs_dir"
513 Unacceptable option value: Failed to configure rendezvous options. See
logs for details.
}}}
With the log message:
{{{
Dec 03 09:14:21.000 [warn] Hidden service ("/tmp/hs_dir") with no ports
configured.
Dec 03 09:14:21.000 [warn] Controller gave us config lines that didn't
validate: Failed to configure rendezvous options. See logs for details.
}}}
(Previously, this would appear to succeed:
{{{
250 OK
}}}
but actually fail, and log failure messages to the log.)
When a valid service is added, the output is:
{{{
SETCONF HiddenServiceDir="/tmp/hs_dir" HiddenServicePort=80
250 OK
}}}
When a duplicate hidden service is added, the output is:
{{{
SETCONF HiddenServiceDir="/tmp/hs_dir" HiddenServicePort=80
HiddenServiceDir="/tmp/hs_dir" HiddenServicePort=80
513 Unacceptable option value: Failed to configure rendezvous options. See
logs for details.
}}}
{{{
Dec 03 09:16:53.000 [warn] Another hidden service is already configured
for directory "/tmp/hs_dir".
Dec 03 09:16:53.000 [warn] Controller gave us config lines that didn't
validate: Failed to configure rendezvous options. See logs for details.
}}}
There is still a bug in check_private_dir where tor will crash if any
directory configured in the options can't be created, but that's been
present since at least 0.2.7, and is due to missing checks on the parent
directory:
{{{
/* XXXX In the case where check==CPD_CHECK, we should look at the
* parent directory a little harder. */
}}}
So, for example:
{{{
SETCONF HiddenServiceDir="/" HiddenServicePort=80
}}}
will likely cause a crash.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20860#comment:5>
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