[tor-bugs] #8051 [Tor]: Broken check for empty "bridge-ips" line in validate_bridge_stats()

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 24 15:09:44 UTC 2013


#8051: Broken check for empty "bridge-ips" line in validate_bridge_stats()
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor         |        Version:                    
 Keywords:  tor-bridge  |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 `geoip_format_bridge_stats()` generates the `bridge-stats` file contents,
 and if `country_data` is NULL then it writes "bridge-ips \n" to the file.

 Then when `validate_bridge_stats()` is called, if it can't find a
 populated `bridge-ips` line it tries to match "bridge-ips\n", which should
 always fail because of the extra whitespace that was added in
 `geoip_format_bridge_stats()`. Isn't that right?

 The only thing that confuses me is why this hasn't triggered so far. Maybe
 something in my analysis is incorrect, or the `bridge-stats` file is
 always generated after we accept a connection?

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


More information about the tor-bugs mailing list