[tor-bugs] #3122 [Tor Client]: Write and use constant-time comparison functions

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed May 11 01:07:37 UTC 2011


#3122: Write and use constant-time comparison functions
-------------------------+--------------------------------------------------
 Reporter:  rransom      |          Owner:  ioerror           
     Type:  enhancement  |         Status:  needs_review      
 Priority:  major        |      Milestone:  Tor: 0.2.1.x-final
Component:  Tor Client   |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by rransom):

 In src/or/control.c:
 {{{
 @@ -508,15 +508,15 @@ connection_printf_to_buf(control_connection_t *conn,
 const char *format, ...)
 }}}
 ...
 {{{
 -  if (tor_memcmp("\r\n\0", buf+len-2, 3)) {
 +  if (fast_memcmp("\r\n\0", buf+len-2, 3)) {
 }}}
 This, too, can be fast_memneq.

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


More information about the tor-bugs mailing list