]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When the client is choosing entry guards, now it selects at most
authorRoger Dingledine <arma@torproject.org>
Mon, 8 Dec 2008 00:04:29 +0000 (00:04 +0000)
committerRoger Dingledine <arma@torproject.org>
Mon, 8 Dec 2008 00:04:29 +0000 (00:04 +0000)
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.

svn:r17514

ChangeLog
src/or/circuitbuild.c
src/or/routerlist.c

index b368619028cfbe6e9f388647eb7ee9a864d4fcf4..e0e9baf92e6e0977f0d8ead9e5a9c39a2cafbbb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,12 @@ Changes in version 0.2.1.8-alpha - 2008-12-08
       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.
index e7ab333e82914520f77a81049920b9a33ebf8a96..e16e1675d2801e27fd6fe4ac68394da1b691eb88 100644 (file)
@@ -1658,8 +1658,10 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
   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);
+        }
       });
   }
 
index 48e66ed8db007ae489db7fc990b5240ffcb9f10e..e2f3170b6ab848681ac4f21bf57efe60fa57bd5f 100644 (file)
@@ -1219,7 +1219,8 @@ routerlist_add_network_family(smartlist_t *sl, routerinfo_t *router)
 }
 
 /** 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)