[tor-bugs] #6545 [Tor Client]: Isolation level may be funky and share circuits?

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Aug 15 20:52:47 UTC 2012


#6545: Isolation level may be funky and share circuits?
------------------------------+---------------------------------------------
 Reporter:  sdjfjsdfiuhszduh  |          Owner:                    
     Type:  defect            |         Status:  new               
 Priority:  normal            |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client        |        Version:                    
 Keywords:                    |         Parent:                    
   Points:                    |   Actualpoints:                    
------------------------------+---------------------------------------------

Comment(by nickm):

 Tried myself; can't reproduce.

 I hacked up the Tor source with this diff to make it loud about attaching
 stuff.  (I should have used existing logs, but I'm lazy):
 {{{
 diff --git a/src/or/control.c b/src/or/control.c
 index 61a9f72..f7c51c8 100644
 --- a/src/or/control.c
 +++ b/src/or/control.c
 @@ -3658,6 +3658,15 @@ control_event_stream_status(entry_connection_t
 *conn, stream_status_event_t tp,
    const char *purpose = "";
    tor_assert(conn->socks_request);

 +  circ = circuit_get_by_edge_conn(ENTRY_TO_EDGE_CONN(conn));
 +  if (circ && CIRCUIT_IS_ORIGIN(circ))
 +    origin_circ = TO_ORIGIN_CIRCUIT(circ);
 +  write_stream_target_to_buf(conn, buf, sizeof(buf));
 +  log_notice(LD_CONTROL, "TEST Stream=%llu Circ=%llu Target=%s",
 +             (uint64_t) ENTRY_TO_CONN(conn)->global_identifier,
 +             origin_circ ? (uint64_t) origin_circ->global_identifier :
 0ull,
 +             buf);
 +
    if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS))
      return 0;

 }}}

 Then I ran Tor with this torrc:
 {{{
 SocksPort 9050
 SocksPort 9051
 SocksPort 9052
 SocksPort 9053
 SocksPort 9054
 SocksPort 9055
 SocksPort 9056
 SocksPort 9057
 }}}

 and I used this script to generate connections:
 {{{
 #!/bin/bash

 for X in 1 2 3 4 5; do
  for socksport in 50 51 52 53 54 55 56 57; do
    curl --socks4a 127.0.0.1:90$socksport www.x$socksport.com > /dev/null
  done
 done
 }}}

 and this script to postprocess the log and look for any websites sharing a
 circuit that shouldn't:
 {{{
 #!/usr/bin/python

 import re
 import sys

 streamTarget = {}
 circTargets = {}

 for line in sys.stdin:
     m = re.search(r'TEST Stream=(\d+) Circ=(\d+) Target=(.*)', line)
     if not m:
         continue
     s, c, t = m.groups()
     if s not in streamTarget:
         streamTarget[s] = t
     if c != '0':
         circTargets.setdefault(c, set()).add(streamTarget[s])

 for c in circTargets:
     if len(circTargets[c]) > 1:
         print c, circTargets[c]
     else:
         print c, "OK"
 }}}

 In other words, two streams with different socksports never went to the
 same circuit.

 Hm.  Are you using hidden services here or something?  What, *exactly* is
 the configuration of your http proxy and your application here?  If we can
 track down what's different between your tests and the ones weasel and I
 are running above, we might be able to figure out what's up with this
 ticket.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6545#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list