[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:11:08 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):

 All of the fast_memcmp calls in src/or/control.c can be fast_memneq calls.

 In src/or/directory.c:
 {{{
 @@ -3454,18 +3454,18 @@ dir_routerdesc_download_failed(smartlist_t
 *failed, int status_code,
  /** Helper.  Compare two fp_pair_t objects, and return -1, 0, or 1 as
   * appropriate. */
  static int
  _compare_pairs(const void **a, const void **b)
 }}}
 This function cannot be relied on to return -1, 0, or 1 even if it calls
 the system's memcmp function.

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


More information about the tor-bugs mailing list