[tor-bugs] #8206 [Tor]: Check return values from fcntl and setsockopt

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Feb 19 01:58:53 UTC 2013


#8206: Check return values from fcntl and setsockopt
----------------------------+-----------------------------------------------
 Reporter:  nickm           |          Owner:                    
     Type:  defect          |         Status:  needs_revision    
 Priority:  minor           |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor             |        Version:                    
 Keywords:  tor-relay easy  |         Parent:                    
   Points:                  |   Actualpoints:                    
----------------------------+-----------------------------------------------
Changes (by nickm):

  * status:  needs_review => needs_revision


Comment:

 A lot of those changes leak the file descriptor by returning an error code
 but never calling close()/CLOSE_SOCKET()/fclose() on the appropriate
 thing.

 Similarly, I don't see how connection_free(conn) can close the fd if
 "conn->s=fd" hasn't been called yet.

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


More information about the tor-bugs mailing list