[or-cvs] r17514: {tor} When the client is choosing entry guards, now it selects at (in tor/trunk: . src/or)

arma at seul.org arma at seul.org
Mon Dec 8 00:04:30 UTC 2008


Author: arma
Date: 2008-12-07 19:04:29 -0500 (Sun, 07 Dec 2008)
New Revision: 17514

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/routerlist.c
Log:
When the client is choosing entry guards, now it selects at most
one guard from a given relay family. Otherwise we could end up with
all of our entry points into the network run by the same operator. 
Suggested by Camilo Viecco. Fix on 0.1.1.11-alpha.

Not a backport candidate, since I think this might break for users
who only have a given /16 in their reachableaddresses, or something
like that.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-12-07 23:53:39 UTC (rev 17513)
+++ tor/trunk/ChangeLog	2008-12-08 00:04:29 UTC (rev 17514)
@@ -5,6 +5,12 @@
       disclaimer without needing to set up a separate webserver. There's
       a sample disclaimer in contrib/tor-exit-notice.html.
 
+  o Security fixes:
+    - When the client is choosing entry guards, now it selects at most
+      one guard from a given relay family. Otherwise we could end up with
+      all of our entry points into the network run by the same operator.
+      Suggested by Camilo Viecco. Fix on 0.1.1.11-alpha.
+
   o Major bugfixes:
     - Fix a DOS opportunity during the voting signature collection process
       at directory authorities. Spotted by rovv. Bugfix on 0.2.0.x.

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2008-12-07 23:53:39 UTC (rev 17513)
+++ tor/trunk/src/or/circuitbuild.c	2008-12-08 00:04:29 UTC (rev 17514)
@@ -1658,8 +1658,10 @@
   if (options->UseEntryGuards && entry_guards) {
     SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry,
       {
-        if ((r = router_get_by_digest(entry->identity)))
+        if ((r = router_get_by_digest(entry->identity))) {
           smartlist_add(excluded, r);
+          routerlist_add_family(excluded, r);
+        }
       });
   }
 

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2008-12-07 23:53:39 UTC (rev 17513)
+++ tor/trunk/src/or/routerlist.c	2008-12-08 00:04:29 UTC (rev 17514)
@@ -1219,7 +1219,8 @@
 }
 
 /** Add all the family of <b>router</b> to the smartlist <b>sl</b>.
- * This is used to make sure we don't pick siblings in a single path.
+ * This is used to make sure we don't pick siblings in a single path,
+ * or pick more than one relay from a family for our entry guard list.
  */
 void
 routerlist_add_family(smartlist_t *sl, routerinfo_t *router)



More information about the tor-commits mailing list