[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15118: Fix a bug where, when we were choosing the 'end stream reaso (in tor/branches/tor-0_2_0-patches: . src/or)



Author: arma
Date: 2008-06-10 22:04:59 -0400 (Tue, 10 Jun 2008)
New Revision: 15118

Modified:
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/or/connection.c
Log:
Fix a bug where, when we were choosing the 'end stream reason' to
put in our relay end cell that we send to the exit relay, Tor
clients on Windows were sometimes sending the wrong 'reason'. The
anonymity problem is that exit relays may be able to guess whether
client is running Windows, thus helping partition the anonymity
set. Down the road we should stop sending reasons to exit relays,
or otherwise prevent future versions of this bug.


Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-06-11 01:50:06 UTC (rev 15117)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-06-11 02:04:59 UTC (rev 15118)
@@ -1,4 +1,13 @@
 Changes in version 0.2.0.28-rc - 2008-06-??
+  o Anonymity fixes:
+    - Fix a bug where, when we were choosing the 'end stream reason' to
+      put in our relay end cell that we send to the exit relay, Tor
+      clients on Windows were sometimes sending the wrong 'reason'. The
+      anonymity problem is that exit relays may be able to guess whether
+      client is running Windows, thus helping partition the anonymity
+      set. Down the road we should stop sending reasons to exit relays,
+      or otherwise prevent future versions of this bug.
+
   o Minor fixes:
     - Bridge relays no longer print "xx=0" in their extrainfo document
       for every single country code in the geoip db.

Modified: tor/branches/tor-0_2_0-patches/src/or/connection.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/connection.c	2008-06-11 01:50:06 UTC (rev 15117)
+++ tor/branches/tor-0_2_0-patches/src/or/connection.c	2008-06-11 02:04:59 UTC (rev 15118)
@@ -1842,13 +1842,13 @@
   before = buf_datalen(conn->inbuf);
   if (connection_read_to_buf(conn, &max_to_read) < 0) {
     /* There's a read error; kill the connection.*/
-    connection_close_immediate(conn); /* Don't flush; connection is dead. */
     if (CONN_IS_EDGE(conn)) {
       edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
       connection_edge_end_errno(edge_conn);
       if (edge_conn->socks_request) /* broken, don't send a socks reply back */
         edge_conn->socks_request->has_finished = 1;
     }
+    connection_close_immediate(conn); /* Don't flush; connection is dead. */
     connection_mark_for_close(conn);
     return -1;
   }