[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs