[tor-bugs] #20716 [Core Tor/Tor]: memory leak in connection_handle_listener_read()

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 18 17:30:24 UTC 2016


#20716: memory leak in connection_handle_listener_read()
--------------------------+------------------------------------
 Reporter:  arma          |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |        Version:  Tor: 0.2.6.3-alpha
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by arma):

 * version:  Tor: 0.2.9.5-alpha => Tor: 0.2.6.3-alpha


Comment:

 The problem was commit {{{8d59ddf3c}}}. Our code now does:
 {{{
     newconn->port = port;
     newconn->address = tor_addr_to_str_dup(&addr);

 [...]

     if (new_type == CONN_TYPE_AP && conn->socket_family == AF_UNIX) {
       newconn->port = 0;
       newconn->address = tor_strdup(conn->address);
       log_info(LD_NET, "New SOCKS AF_UNIX connection opened");
     }
 }}}

 So basically, we leak an 'address' string every time we get a unix domain
 socket socks request.

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


More information about the tor-bugs mailing list