summaryrefslogtreecommitdiff
path: root/src/or/entrynodes.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-28 11:41:50 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-29 09:57:00 -0400
commit665baf5ed5c6186d973c46cdea165c0548027350 (patch)
treeb079326e84dd888dcea50f7192e5ccf319579f48 /src/or/entrynodes.h
parenta242d194c74b318b8ee4b347efd09ed13d0d2549 (diff)
downloadtor-665baf5ed5c6186d973c46cdea165c0548027350.tar.gz
tor-665baf5ed5c6186d973c46cdea165c0548027350.zip
Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code consider the exit family as well, and adds some (hopefully redundant) checks for the case where we lack a node_t for a guard but we have a bridge_info_t for it. Fixes bug 22753; bugfix on 0.3.0.1-alpha. Tracked as TROVE-2016-006 and CVE-2017-0377.
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r--src/or/entrynodes.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index f02901f5d7..6ccc48f32f 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -276,16 +276,17 @@ struct entry_guard_handle_t;
* A restriction to remember which entry guards are off-limits for a given
* circuit.
*
- * Right now, we only use restrictions to block a single guard from being
- * selected; this mechanism is designed to be more extensible in the future,
- * however.
+ * Right now, we only use restrictions to block a single guard and its family
+ * from being selected; this mechanism is designed to be more extensible in
+ * the future, however.
*
* Note: This mechanism is NOT for recording which guards are never to be
* used: only which guards cannot be used on <em>one particular circuit</em>.
*/
struct entry_guard_restriction_t {
/**
- * The guard's RSA identity digest must not equal this.
+ * The guard's RSA identity digest must not equal this; and it must not
+ * be in the same family as any node with this digest.
*/
uint8_t exclude_id[DIGEST_LEN];
};