[tor-bugs] #7708 [Tor]: connection_handle_write_impl mishandles TOR_TLS_WANT_WRITE

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 11 22:34:38 UTC 2012


#7708: connection_handle_write_impl mishandles TOR_TLS_WANT_WRITE
-----------------------+----------------------------------------------------
 Reporter:  nickm      |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  major      |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor        |        Version:                    
 Keywords:  tor-relay  |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 Reported pseudonymously:

 It appears that connection_handle_write_impl exits quickly when it hears
 TOR_TLS_WANT_WRITE from flush_from_buf_tls.  But flush_from_buf_tls can
 return that error code even when it has flushed some data.  That means
 that the other code in that function -- like decrementing buckets and
 calling flushed_some functions -- might not get called at all.

 I'm attaching the suggested patch; I think the patch could actually be
 even simpler.

 This could be a backport candidate for 0.2.3.

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


More information about the tor-bugs mailing list