[tor-commits] [tor/release-0.2.2] Never choose a bridge as an exit. Bug 5342.

arma at torproject.org arma at torproject.org
Thu Apr 5 20:32:20 UTC 2012


commit 99bd5400e879e7313288f153f464e0b3bc0782e0
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Mar 9 14:27:50 2012 -0500

    Never choose a bridge as an exit. Bug 5342.
---
 changes/bug5342       |    3 +++
 src/or/circuitbuild.c |    6 +++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/changes/bug5342 b/changes/bug5342
new file mode 100644
index 0000000..b2ae451
--- /dev/null
+++ b/changes/bug5342
@@ -0,0 +1,3 @@
+  o Security fixes:
+    - Never use a bridge as an exit, even if it claims to be one.  Found by
+      wanoskarnet. Fixes bug 5342. Bugfix on ????.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 72ec9e4..decb18f 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2704,7 +2704,11 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
       n_supported[i] = -1;
       continue; /* skip routers that are known to be down or bad exits */
     }
-
+    if (router->purpose != ROUTER_PURPOSE_GENERAL) {
+      /* never pick a non-general node as a random exit. */
+      n_supported[i] = -1;
+      continue;
+    }
     if (options->_ExcludeExitNodesUnion &&
         routerset_contains_router(options->_ExcludeExitNodesUnion, router)) {
       n_supported[i] = -1;





More information about the tor-commits mailing list