[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #3733 [Tor]: Tor should abandon rendezvous circuits that cause a client request to time out



#3733: Tor should abandon rendezvous circuits that cause a client request to time
out
-------------------------+--------------------------------
     Reporter:  rransom  |      Owner:  rransom
         Type:  defect   |     Status:  needs_review
     Priority:  normal   |  Milestone:  Tor: 0.2.7.x-final
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  SponsorR, tor-hs
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+--------------------------------
Changes (by dgoulet):

 * keywords:  SponsorR tor-hs => SponsorR, tor-hs
 * status:  new => needs_review
 * milestone:  Tor: unspecified => Tor: 0.2.7.x-final


Comment:

 Reviving this one.

 Looking at the code, when a client arrives on the SocksPort, we try to
 attach on a rendezvous circuit if any. To find that circuit, we call
 `circuit_get_open_circ_or_launch()` and immediately `circuit_get_best()`
 with the indication that it "must be open". In that function, we use
 `circuit_is_acceptable()` that returns 0 if the rendezvous circuit has
 timed out (`origin_circ->hs_circ_has_timed_out)`).

 That whole process above makes the client launch a new RP circuit. Which
 is what we want. The issue seems to be that `hs_circ_has_timed_out` is
 never set to 1 on the client side for the circuit purpose
 `CIRCUIT_PURPOSE_C_ESTABLISH_REND`. Would that patch fix the issue or
 completely wrong?

 {{{
 diff --git a/src/or/circuituse.c b/src/or/circuituse.c
 index b54a4d2..c6bed5a 100644
 --- a/src/or/circuituse.c
 +++ b/src/or/circuituse.c
 @@ -717,6 +717,7 @@ circuit_expire_building(void)
          /* connection_ap_handshake_attach_circuit() will relaunch for us
 */
        case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
        case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
 +      case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
          /* If we have reached this line, we want to spare the circ for
 now. */
          log_info(LD_CIRC,"Marking circ %u (state %d:%s, purpose %d) "
                   "as timed-out HS circ",
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3733#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs