[tor-bugs] #4592 [Tor Relay]: tor_tls_server_info_callback(): SSL3_ST_SW_SRVR_HELLO_B missed.

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Nov 28 06:34:15 UTC 2011


#4592: tor_tls_server_info_callback(): SSL3_ST_SW_SRVR_HELLO_B missed.
-----------------------+----------------------------------------------------
 Reporter:  troll_un   |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  normal     |      Milestone:  Tor: 0.2.2.x-final
Component:  Tor Relay  |        Version:  Tor: 0.2.2.34     
 Keywords:             |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 {{{
                 case SSL3_ST_SW_SRVR_HELLO_A:
                 case SSL3_ST_SW_SRVR_HELLO_B:
                         ret=ssl3_send_server_hello(s);
                         if (ret <= 0) goto end;
 #ifndef OPENSSL_NO_TLSEXT
                         if (s->hit)
                                 {
                                 if (s->tlsext_ticket_expected)
 s->state=SSL3_ST_SW_SESSION_TICKET_A;
                                 else
                                         s->state=SSL3_ST_SW_CHANGE_A;
                                 }
 #else
                         if (s->hit)
                                         s->state=SSL3_ST_SW_CHANGE_A;
 #endif
                         else
                                 s->state=SSL3_ST_SW_CERT_A;
                         s->init_num=0;
                         break;
 }}}

 {{{
                         if ((cb != NULL) && (s->state != state))
                                 {
                                 new_state=s->state;
                                 s->state=state;
                                 cb(s,SSL_CB_ACCEPT_LOOP,1);
                                 s->state=new_state;
                                 }
 }}}
 As non blocking io ssl3_send_server_hello() can return -1 (can't to fit
 all bytes of record in wire), and no CallBack of tor's
 tor_tls_server_info_callback(). Later SSL_accept() calling callback with
 s->state == SSL3_ST_SW_SRVR_HELLO_B.

 If relay can't to fit server's hello in wire once, it never can finish v2
 link hanshake.

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


More information about the tor-bugs mailing list