Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guard: Ignore marked for close circuit when changing state to open #1117

Open
wants to merge 1 commit into
base: maint-0.3.5
from

Conversation

@dgoulet-tor
Copy link
Contributor

commented Jun 18, 2019

When we consider all circuits in "waiting for guard" state to be promoted to
an "open" state, we were considering all circuits, even the one marked for
close.

This ultiamtely triggers a "circuit_has_opened()" called on the circuit that
is marked for close which then leads to possible undesirable behaviors within
a subsystem.

For instance, the HS subsystem would be unable to find the authentication key
of the introduction point circuit leading to a BUG() warning and a duplicate
mark for close on the circuit.

This commit also adds a unit test to make sure we never select marked for
close circuits when upgrading its guard state from waiting for guard to open.

Fixes #30871

Signed-off-by: David Goulet dgoulet@torproject.org

@coveralls

This comment has been minimized.

Copy link

commented Jun 18, 2019

Pull Request Test Coverage Report for Build 5365

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 60.304%

Totals Coverage Status
Change from base Build 5299: 0.02%
Covered Lines: 42862
Relevant Lines: 71077

💛 - Coveralls

@dgoulet-tor dgoulet-tor force-pushed the dgoulet-tor:ticket30871_035_01 branch from 6ff82f6 to 49ee5a4 Jun 18, 2019

guard: Ignore marked for close circuit when changing state to open
When we consider all circuits in "waiting for guard" state to be promoted to
an "open" state, we were considering all circuits, even the one marked for
close.

This ultiamtely triggers a "circuit_has_opened()" called on the circuit that
is marked for close which then leads to possible undesirable behaviors within
a subsystem.

For instance, the HS subsystem would be unable to find the authentication key
of the introduction point circuit leading to a BUG() warning and a duplicate
mark for close on the circuit.

This commit also adds a unit test to make sure we never select marked for
close circuits when upgrading its guard state from waiting for guard to open.

Fixes #30871

Signed-off-by: David Goulet <dgoulet@torproject.org>

@dgoulet-tor dgoulet-tor force-pushed the dgoulet-tor:ticket30871_035_01 branch from 49ee5a4 to e3f3478 Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.