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

Re: [tor-bugs] #6465 [Tor]: Build abstraction layer around TLS



#6465: Build abstraction layer around TLS
-----------------------+----------------------------------------------------
 Reporter:  andrea     |          Owner:  andrea            
     Type:  project    |         Status:  needs_review      
 Priority:  major      |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor        |        Version:  Tor: unspecified  
 Keywords:  tor-relay  |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------

Comment(by andrea):

 The assert on exit was being caused by connection_or_connect() setting
 tlschan->conn early so some calls it makes work, but then returning NULL
 on a connection_connect() error later on.  When channel_tls_connect()
 calls it, it (wrongly) assumed that tlschan->conn == NULL iff error, so in
 some error cases (host unreachable during connection_connect() in the
 instance I observed), it would leave a channel_tls_t hanging around in
 CHANNEL_STATE_OPENING with a bad pointer to a freed or_connection_t
 forever, and then during channel_free_all() would trigger the assert by
 trying to access that or_connection_t.  Fix is straight forward (check
 return value rather than tlschan->conn in channel_tls_connect()), and
 implemented in bug6465_draft_2.  Changes per code review to follow in that
 branch.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6465#comment:42>
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