[tor-bugs] #6774 [Tor Client]: segfault in entry_guards_parse_state()

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Sep 5 15:54:40 UTC 2012


#6774: segfault in entry_guards_parse_state()
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 I got:

 {{{
 Program received signal SIGSEGV, Segmentation fault.
 entry_guards_parse_state (state=state at entry=0x5555558e4840,
 set=set at entry=0, msg=0x7fffffffe1f0) at src/or/circuitbuild.c:4913
 4913                           node->first_hops = hop_cnt;
 }}}

 It seems that if there is an `EntryGuardPathBias` line without an
 `EntryGuard` line before it, it will try to do `node->first_hops =
 hop_cnt` with `node` being NULL, since `node` is instantiated when the
 first `EntryGuard` line is encountered.

 Other codepaths in the same function, like `EntryGuardDownSince`, check
 for `!node` but it seems that `EntryGuardPathBias` doesn't. Checking for
 `!node` might be a sufficient fix.

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


More information about the tor-bugs mailing list