[tor-bugs] #31608 [Core Tor/Tor]: circuit_state_publish() never triggers when a new origin circuit is created

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 3 19:21:38 UTC 2019


#31608: circuit_state_publish() never triggers when a new origin circuit is created
------------------------------+--------------------------------
     Reporter:  dgoulet       |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.4.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-circuit
Actual Points:                |  Parent ID:
       Points:  0.1           |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 In `origin_circuit_init()`, we change the circuit state before allocating
 the `build_state` but also before a purpose is set.

 This means that `circuit_state_publish()` located in `circuit_set_state()`
 is never called for a new circuit because `CIRCUIT_IS_ORIGIN()` doesn't
 return true.

 Which in turn, by chance I believe, made this NULL deref on `build_state`
 to never happen.

 This should be fixed regardless.

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


More information about the tor-bugs mailing list