[tor-bugs] #9671 [Tor]: Disabling cbt by consensus doesn't disable exploratory circuit building

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Sep 4 17:44:33 UTC 2013


#9671: Disabling cbt by consensus doesn't disable exploratory circuit building
------------------------+------------------------------------
 Reporter:  arma        |          Owner:
     Type:  defect      |         Status:  new
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor         |        Version:
 Keywords:  tor-client  |  Actual Points:
Parent ID:              |         Points:
------------------------+------------------------------------
 At the bottom of circuit_predict_and_launch_new() we check
 {{{
   /* Finally, check to see if we still need more circuits to learn
    * a good build timeout. But if we're close to our max number we
    * want, don't do another -- we want to leave a few slots open so
    * we can still build circuits preemptively as needed. */
   if (num < MAX_UNUSED_OPEN_CIRCUITS-2 &&
       get_options()->LearnCircuitBuildTimeout &&
       circuit_build_times_needs_circuits_now(&circ_times)) {
     flags = CIRCLAUNCH_NEED_CAPACITY;
     log_info(LD_CIRC,
              "Have %d clean circs need another buildtime test circ.",
 num);
     circuit_launch(CIRCUIT_PURPOSE_C_GENERAL, flags);
     return;
   }
 }}}

 Here we check get_options()->LearnCircuitBuildTimeout directly, rather
 than calling circuit_build_times_disabled(). That means we do these
 exploratory circuits even when cbt is disabled by consensus, or when we're
 a directory authority, or when we've failed to write cbt history to our
 state file lately.

 We also have the same bug in circuit_expire_old_circuits_clientside()
 where
 {{{
   if (get_options()->LearnCircuitBuildTimeout &&
       circuit_build_times_needs_circuits(&circ_times)) {
     /* Circuits should be shorter lived if we need more of them
      * for learning a good build timeout */
     cutoff.tv_sec -= IDLE_TIMEOUT_WHILE_LEARNING;
   } else {
     cutoff.tv_sec -= get_options()->CircuitIdleTimeout;
   }
 }}}

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


More information about the tor-bugs mailing list