[tor-bugs] #27335 [Core Tor/Tor]: Tor bug when hs directory is missing
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Aug 28 13:20:17 UTC 2018
#27335: Tor bug when hs directory is missing
--------------------------+------------------------------------
Reporter: traumschule | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor | Version: Tor: 0.3.4.6-rc
Severity: Normal | Resolution:
Keywords: tor-hs | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by dgoulet):
Hmmm so this one is a bit more deep into Tor.
During the configuration process (which doesn't load the keys nor create
directories), the service directory path is validated. Here, the problem
lies that the *parent* directory (`hidden_services/`) doesn't exists but
tor do realize that but still makes it OK to continue because it is
telling itself "I can probably create the missing directory if asked to".
However, that is not true, Tor can't create hierarchy of directories
because we simply don't have the code.
In `check_private_dir()`, if the directory is not found and we haven't
asked to create it, there is this comment:
{{{
/* XXXX In the case where check==CPD_CHECK, we should look at the
* parent directory a little harder. */
return 0;
}}}
The solution to this is to either teach Tor to create hierarchy of
directories (creating in the process the parent) or make
`check_private_dir()` return an error if a parent doesn't exists telling
the user to fix that and stopping tor to continue.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27335#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list