Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-03-26 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
-+-
 Reporter:  iry  |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.1.9
 Severity:  Normal   | Resolution:
 Keywords:  033-triage-20180320, |  Actual Points:
  033-removed-20180320   |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * milestone:  Tor: 0.3.3.x-final => Tor: unspecified


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-03-24 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
-+-
 Reporter:  iry  |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.3.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.1.9
 Severity:  Normal   | Resolution:
 Keywords:  033-triage-20180320, |  Actual Points:
  033-removed-20180320   |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by arma):

 * status:  needs_information => new


Comment:

 Setting back out of needs-information, since we know what the bug is (see
 my comments 7-9): the bug is that we're doing the wrong thing for opening
 our control sockets.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.1.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 My guess is that we defer opening the unix domain socket here, and then we
 never call retry_all_listeners() again from config.c because our config
 hasn't changed.

 There's a call to retry_all_listeners() in main.c, in this thing called
 retry_listeners_callback(), except it runs
 {{{
   if (!net_is_disabled()) {
 retry_all_listeners(NULL, NULL, 0);
 }}}
 so when net_is_disabled, it just never calls retry_all_listeners again.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.1.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 {{{
 #ifndef _WIN32
 /* We don't need to be root to create a UNIX socket, so defer until
 after
  * setuid. */
 const or_options_t *options = get_options();
 if (port->is_unix_addr && !geteuid() && (options->User) &&
 strcmp(options->User, "root"))
   continue;
 #endif /* !defined(_WIN32) */
 }}}

 is where we defer opening the control socket listener

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.1.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by arma):

 Our first weird hint. Not using the User option, we have
 {{{
 Feb 07 22:06:02.093 [notice] Read configuration file
 "/usr/local/etc/tor/torrc".
 Feb 07 22:06:02.098 [warn] ControlPort is open, but no authentication
 method has been configured.  This means that any program on your computer
 can reconfigure your Tor.  That's bad!  You should upgrade your Tor
 controller as soon as possible.
 Feb 07 22:06:02.098 [notice] Scheduler type KIST has been enabled.
 Feb 07 22:06:02.098 [notice] Opening Socks listener on 127.0.0.1:9050
 Feb 07 22:06:02.098 [notice] Opening Control listener on 127.0.0.1:9051
 Feb 07 22:06:02.098 [notice] Opening Control listener on
 /home/arma/.tor/control
 Feb 07 22:06:02.098 [notice] Opening Control listener on
 /tmp/tor/control.sock
 Feb 07 22:06:02.098 [warn] Your log may contain sensitive information -
 you disabled SafeLogging, and you're logging more than "notice". Don't log
 unless it serves an important reason. Overwrite the log afterwards.
 Feb 07 22:06:02.103 [notice] Parsing GEOIP IPv4 file
 /usr/local/share/tor/geoip.
 Feb 07 22:06:02.220 [notice] Parsing GEOIP IPv6 file
 /usr/local/share/tor/geoip6.
 Feb 07 22:06:02.726 [notice] Bootstrapped 0%: Starting
 }}}

 That is, our controlsocket opens at the same time as the control port.

 But using User, we have
 {{{
 Feb 07 21:25:12.170 [notice] Read configuration file "/tmp/torrc".
 Feb 07 21:25:12.175 [notice] Scheduler type KIST has been enabled.
 Feb 07 21:25:12.175 [notice] Opening Socks listener on 127.0.0.1:9050
 Feb 07 21:25:12.000 [notice] Parsing GEOIP IPv4 file
 /usr/local/share/tor/geoip.
 Feb 07 21:25:12.000 [notice] Parsing GEOIP IPv6 file
 /usr/local/share/tor/geoip6.
 Feb 07 21:25:12.000 [notice] Bootstrapped 0%: Starting
 Feb 07 21:25:12.000 [notice] Starting with guard context "default"
 Feb 07 21:25:12.000 [notice] Bootstrapped 80%: Connecting to the Tor
 network
 Feb 07 21:25:13.000 [notice] Opening Control listener on
 /tmp/tor/control.sock
 Feb 07 21:25:13.000 [notice] Bootstrapped 85%: Finishing handshake with
 first hop
 }}}

 What in our code path is making us open the control socket listener so
 much later when User is set?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.1.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * version:  Tor: 0.3.2.9 => Tor: 0.3.1.9


Comment:

 We use the earliest version that a bug appears in. That makes it easier to
 find the bug.

 Looking forward to seeing logs of what Tor does with the control socket
 file on startup and on HUP. That will give us some clues.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.2.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+

Comment (by yawning):

 Log output if any is helpful as well (and there is a debug log level).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: 0.3.2.9
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by iry):

 * version:  Tor: unspecified => Tor: 0.3.2.9


Comment:

 Thank you, teor!

 > I tested both Tor 0.3.1.9 and 0.3.2.9 on Debian Stretch

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  needs_information
 Priority:  Medium|  Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor  |Version:  Tor: unspecified
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * status:  new => needs_information
 * milestone:   => Tor: 0.3.3.x-final


Comment:

 You don't say what tor version you are running. That makes it hard for us
 to work out where the bug is.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+--
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:  Tor: unspecified
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+--

Comment (by iry):

 I am too afraid to say it is a Tor bug because I may be the one who did
 something wrong. Therefore, could anyone please help me to check this?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25173 [Core Tor/Tor]: No Control Socket when DisableNetwork and User options are set

2018-02-07 Thread Tor Bug Tracker & Wiki
#25173: No Control Socket when DisableNetwork and User options are set
--+--
 Reporter:  iry   |  Owner:  (none)
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:  Tor: unspecified
 Severity:  Normal| Resolution:
 Keywords:|  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+--

Comment (by iry):

 For temporary workaround using systemd in Debian, I put these lines in the
 /lib/systemd/system/tor@default.service.d/controlport-workaround.service :

 {{{

 [Service]
 ExecStartPost=/bin/kill -HUP ${MAINPID}
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs