[tor-bugs] #31408 [Core Tor/Tor]: torrc : ClientOnionAuthDir after include directives breaks client to v2 services
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Sep 22 21:21:47 UTC 2019
#31408: torrc : ClientOnionAuthDir after include directives breaks client to v2
services
----------------------------------------+----------------------------------
Reporter: xaho | Owner: asn
Type: defect | Status: needs_review
Priority: Very High | Milestone: Tor:
| 0.4.2.x-final
Component: Core Tor/Tor | Version: Tor: 0.4.0.5
Severity: Normal | Resolution:
Keywords: tor-hs regression 042-must | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
----------------------------------------+----------------------------------
Changes (by Jigsaw52):
* status: assigned => needs_review
Comment:
The cause of this problem is a bug in the processing of included folders
containing files with only comments or whitespace. I was able to reproduce
this problem with the following configuration:
torrc:
{{{
%include /etc/tor/torrc.d/
Log notice stderr # can be any valid option
}}}
/etc/tor/torrc.d/01_invalid:
{{{
InvalidOption
}}}
/etc/tor/torrc.d/02_comment:
{{{
# comment
}}}
Running tor --verify-config -f torrc will incorrectly identify this as a
valid configuration despite the invalid option on
/etc/tor/torrc.d/01_invalid.
The bug is that any files on a %included folder where the last file
contains only comments or whitespace are being ignored. Also the bug is
only triggered if there is a valid option after the %include.
The cause of this bug is that, when creating the list of configurations
options from the included files, a pointer to the last element of the list
is incorrectly set to NULL when processing a file with only comments or
whitespace. This can cause the options list to be built incorrectly,
causing this behaviour.
I've made a pull request with a fix for this problem and a test case:
https://github.com/torproject/tor/pull/1347
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31408#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list