Opened 2 months ago

Last modified 4 days ago

#29034 assigned defect

circuit: Cleanup an HS circuit when it is being re-purposed

Reported by: dgoulet Owned by: mikeperry
Priority: High Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs-reachability, 035-backport, postfreeze-ok, 040-must
Cc: asn, mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Mike found out that when an IP/RP circuit fails to build in the right amount of time (for instance through circuit_expire_building()), it is re-purposed to become a measurement circuit.

The issue is that those HS circuits are set in the HS circuitmap and have an hs_ident or rend_data set to them that should really not linger in the circuit object if the circuit is not an HS one anymore.

Offenders: circuit_build_times_mark_circ_as_measurement_only() and pathbias_send_usable_probe().


circuit_change_purpose() is probably the right place to make a callback within the HS subsystem specific to cleaning up a circuit for a purpose change. I think we need a new function that specifically does that and not use hs_circ_cleanup() since it won't remove the ident.

Lingering circuits in the HS circuitmap is bad and this bug could probably explain some of the issues we had with clients unable to establish connections because the IP auth key wouldn't match the one in the circuit ident.

I strongly believe this should be backported up to 0.3.5 at the very least.

Child Tickets

Change History (5)

comment:1 Changed 2 months ago by nickm

Keywords: postfreeze-ok added

comment:2 Changed 7 weeks ago by mikeperry

Keywords: tor-hs-reachability added; tor-hs removed

comment:3 Changed 4 weeks ago by nickm

Keywords: 040-must added

Marking tickets as 040-must based on triage with dgoulet.

comment:4 Changed 4 weeks ago by dgoulet

Owner: set to dgoulet
Status: newassigned

comment:5 Changed 4 days ago by teor

Owner: changed from dgoulet to mikeperry

dgoulet is on leave, assigning to Mike, because asn already has 3 tickets in 040-must.

Note: See TracTickets for help on using tickets.