瀏覽代碼

Never choose a bridge as an exit. Bug 5342.

Nick Mathewson 12 年之前
父節點
當前提交
99bd5400e8
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 3 0
      changes/bug5342
  2. 5 1
      src/or/circuitbuild.c

+ 3 - 0
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 ????.

+ 5 - 1
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;