Browse Source

Merge branch 'maint-0.2.7' into release-0.2.7

Roger Dingledine 9 years ago
parent
commit
b2a53e8ca9
14 changed files with 1065 additions and 208 deletions
  1. 4 0
      changes/bug16056
  2. 4 0
      changes/bug16702
  3. 4 0
      changes/bug17551
  4. 3 0
      changes/bug17722
  5. 7 0
      changes/bug17772
  6. 3 0
      changes/bug17781
  7. 4 0
      changes/geoip-december2015
  8. 3 0
      configure.ac
  9. 384 103
      src/config/geoip
  10. 631 98
      src/config/geoip6
  11. 3 3
      src/or/policies.c
  12. 2 1
      src/or/rendservice.c
  13. 8 2
      src/or/routerlist.c
  14. 5 1
      src/or/torcert.c

+ 4 - 0
changes/bug16056

@@ -0,0 +1,4 @@
+  o Minor bugfixes (relay, IPv6):
+    - When displaying an IPv6 exit policy, include the mask bits correctly
+      even when the number is greater than 31. Fixes bug 16056; bugfix on
+      0.2.4.7-alpha. Patch from "gturner".

+ 4 - 0
changes/bug16702

@@ -0,0 +1,4 @@
+  o Minor bugfixes (hidden service)
+    - The wrong list was used when looking up expired intro points in a rend
+      service object causing what we think could be reachability issues and
+      triggering a BUG log. Fixes 16702; bugfix on tor-0.2.7.2-alpha.

+ 4 - 0
changes/bug17551

@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation):
+    - When checking for net/pfvar.h, include netinet/in.h if possible.
+      This fixes transparent proxy detection on OpenBSD. Fixes bug
+      17551; bugfix on 0.1.2.1-alpha. Patch from "rubiate".

+ 3 - 0
changes/bug17722

@@ -0,0 +1,3 @@
+  o Minor bugfixes (code correctness)
+    - Fix undefined behavior in the tor_cert_checksig function. Fixes bug
+      17722; bugfix on tor-0.2.7.2-alpha.

+ 7 - 0
changes/bug17772

@@ -0,0 +1,7 @@
+  o Major bugfixes (guard selection):
+    - Actually look at the Guard flag when selecting a new directory
+      guard. When we implemented the directory guard design, we
+      accidentally started treating all relays as if they have the Guard
+      flag during guard selection, leading to weaker anonymity and worse
+      performance. Fixes bug 17222; bugfix on 0.2.4.8-alpha. Discovered
+      by Mohsen Imani.

+ 3 - 0
changes/bug17781

@@ -0,0 +1,3 @@
+  o Compilation fixes:
+    - Fix a compilation warning with Clang 3.6: Do not check the
+      presence of an address which can never be NULL. Fixes bug 17781.

+ 4 - 0
changes/geoip-december2015

@@ -0,0 +1,4 @@
+  o Minor features:
+    - Update geoip and geoip6 to the December 1 2015 Maxmind GeoLite2
+      Country database.
+

+ 3 - 0
configure.ac

@@ -971,6 +971,9 @@ AC_CHECK_HEADERS(net/pfvar.h, net_pfvar_found=1, net_pfvar_found=0,
 #endif
 #ifdef HAVE_NET_IF_H
 #include <net/if.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
 #endif])
 
 AC_CHECK_HEADERS(linux/if.h,[],[],

File diff suppressed because it is too large
+ 384 - 103
src/config/geoip


File diff suppressed because it is too large
+ 631 - 98
src/config/geoip6


+ 3 - 3
src/or/policies.c

@@ -1391,9 +1391,9 @@ policy_write_item(char *buf, size_t buflen, addr_policy_t *policy,
   if (result < 0)
     return -1;
   written += strlen(buf);
-  /* If the maskbits is 32 we don't need to give it.  If the mask is 0,
-   * we already wrote "*". */
-  if (policy->maskbits < 32 && policy->maskbits > 0) {
+  /* If the maskbits is 32 (IPv4) or 128 (IPv6) we don't need to give it.  If
+     the mask is 0, we already wrote "*". */
+  if (policy->maskbits < (is_ip6?128:32) && policy->maskbits > 0) {
     if (tor_snprintf(buf+written, buflen-written, "/%d", policy->maskbits)<0)
       return -1;
     written += strlen(buf+written);

+ 2 - 1
src/or/rendservice.c

@@ -3038,7 +3038,8 @@ find_expiring_intro_point(rend_service_t *service, origin_circuit_t *circ)
   tor_assert(TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
              TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_INTRO);
 
-  SMARTLIST_FOREACH(service->intro_nodes, rend_intro_point_t *, intro_point,
+  SMARTLIST_FOREACH(service->expiring_nodes, rend_intro_point_t *,
+                    intro_point,
     if (crypto_pk_eq_keys(intro_point->intro_key, circ->intro_key)) {
       return intro_point;
   });

+ 8 - 2
src/or/routerlist.c

@@ -1501,8 +1501,14 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags,
     if ((type & EXTRAINFO_DIRINFO) &&
         !router_supports_extrainfo(node->identity, is_trusted_extrainfo))
       continue;
-    if (for_guard && node->using_as_guard)
-      continue; /* Don't make the same node a guard twice. */
+    /* Don't make the same node a guard twice */
+    if (for_guard && node->using_as_guard) {
+      continue;
+    }
+    /* Ensure that a directory guard is actually a guard node. */
+    if (for_guard && !node->is_possible_guard) {
+      continue;
+    }
     if (try_excluding &&
         routerset_contains_routerstatus(options->ExcludeNodes, status,
                                         country)) {

+ 5 - 1
src/or/torcert.c

@@ -206,7 +206,11 @@ tor_cert_checksig(tor_cert_t *cert,
     return -1;
   } else {
     cert->sig_ok = 1;
-    memcpy(cert->signing_key.pubkey, checkable.pubkey->pubkey, 32);
+    /* Only copy the checkable public key when it is different from the signing
+     * key of the certificate to avoid undefined behavior. */
+    if (cert->signing_key.pubkey != checkable.pubkey->pubkey) {
+      memcpy(cert->signing_key.pubkey, checkable.pubkey->pubkey, 32);
+    }
     cert->cert_valid = 1;
     return 0;
   }

Some files were not shown because too many files changed in this diff