]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Clarify threat description and avoid negative uptimes.
authorNick Mathewson <nickm@torproject.org>
Fri, 11 Mar 2011 18:03:25 +0000 (13:03 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 12 Mar 2011 04:27:53 +0000 (23:27 -0500)
changes/hsdir_assignment
src/or/rephist.c

index ba019901ee710c11162ca339e18c39a88dfd5616..5c04b9b9bbb72d2a9576917b8863f4b558c82696 100644 (file)
@@ -2,6 +2,7 @@
     - Directory authorities now use data collected from rephist when
       choosing whether to assign the HSDir flag to relays, instead of
       trusting the uptime value the relay reports in its descriptor.
-      This helps prevent an attack where relatively few malaicious
-      nodes can blackhole any given hidden service. Bugfix on
-      0.2.0.10-alpha; fixes bug 2709.
+      This helps prevent an attack where a small set of nodes with
+      frequently-changing identity keys can blackhole a hidden service.
+      (Only authorities need upgrade; others will be fine once they do.)
+      Bugfix on 0.2.0.10-alpha; fixes bug 2709.
index 69001de8397f51da4c500586ad280c5f2ec8d62e..e4afe62b679786d937c8bf9722d10ac7cf1fab04 100644 (file)
@@ -537,7 +537,7 @@ rep_hist_get_uptime(const char *id, time_t when)
   or_history_t *hist = get_or_history(id);
   if (!hist)
     return 0;
-  if (!hist->start_of_run)
+  if (!hist->start_of_run || when < hist->start_of_run)
     return 0;
   return when - hist->start_of_run;
 }