[tor-bugs] #9650 [Tor]: create_managed_proxy_environment: lack of checks for values returned by get_first_listener_addrport_string

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Apr 5 14:48:34 UTC 2014


#9650: create_managed_proxy_environment: lack of checks for values returned by
get_first_listener_addrport_string
-----------------------------+---------------------------------------------
     Reporter:  cypherpunks  |      Owner:  asn
         Type:  defect       |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  tor-pt 024-backport 025-triaged
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------------------------------

Comment (by asn):

 Looks good to me.

 I don't think this can happen IRL, since in `config.c` we make sure that
 we have an ORPort torrc option before launching any server-side PT proxies
 (see `options_act`). Also, we do
 {{{
     if (options->ExtORPort_lines) {
       char *ext_or_addrport_tmp =
         get_first_listener_addrport_string(CONN_TYPE_EXT_OR_LISTENER);
 }}}
 which means that that function will only be called if there is an
 ExtORPort torrc option too.

 I assume that an ORPort/ExtORPort torrc line will eventually become a
 listener which can be found by `get_first_listener_addrport_string()`. I
 think this is the case, since Tor errors out if it can't set up a
 listener.

 In any case, the proposed branch looks defensive and good to me.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9650#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list