[tor-bugs] #6244 [Tor Client]: MapAddress wildcarding not working right

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Jun 27 06:10:30 UTC 2012


#6244: MapAddress wildcarding not working right
------------------------+---------------------------------------------------
 Reporter:  grarpamp    |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:  Tor: 0.2.3.17-beta
 Keywords:  mapaddress  |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by grarpamp):

 On maint-0.2.3 6330d2d now.
 Well, either it, or me, is quite messed up :) Hope this covers it.

 With the same torrc as above, a fresh exec of tor per item, and
 giving three successive invocations of...
 curl --socks5-hostname 127.0.0.1:9050 -o /dev/null -s
 http://www.openbsd.org/

 I grouped setevents stream and address-mappings/all output by
 invocation.

 Not sure why the map expiry times differ. Such as today, vs. a week
 away. Nor about the 3hr offsets.

 Not sure why each invocation grows additional maps.

 It's mostly the same, just noted more bugs and added streams to (1).

 Items...

 1) With no map we have...

 151 NEW 0 www.openbsd.org:80 SOURCE_ADDR=127.0.0.1:60019 PURPOSE=USER
 151 SENTCONNECT 41 www.openbsd.org:80
 151 REMAP 41 142.244.12.42:80 SOURCE=EXIT
 151 SUCCEEDED 41 142.244.12.42:80
 151 CLOSED 41 142.244.12.42:80 REASON=DONE
 www.openbsd.org www.openbsd.org.___FP1___.exit "2012-07-04 03:18:45"

 153 NEW 0 www.openbsd.org:80 SOURCE_ADDR=127.0.0.1:55073 PURPOSE=USER
 153 REMAP 0 www.openbsd.org.___FP1___.exit:80 SOURCE=CACHE
 153 SENTCONNECT 41 www.openbsd.org.___FP1___.exit:80
 153 REMAP 41 142.244.12.42.___FP1___.exit:80 SOURCE=EXIT
 153 SUCCEEDED 41 142.244.12.42.___FP1___.exit:80
 153 CLOSED 41 142.244.12.42.___FP1___.exit:80 REASON=DONE
 www.openbsd.org www.openbsd.org.___FP1___.exit "2012-07-04 03:19:02"
 www.openbsd.org.___FP1___.exit 142.244.12.42.___FP1___.exit "2012-06-27
 06:19:02"

 155 NEW 0 www.openbsd.org:80 SOURCE_ADDR=127.0.0.1:18968 PURPOSE=USER
 155 REMAP 0 142.244.12.42.___FP1___.exit:80 SOURCE=CACHE
 155 SENTCONNECT 41 142.244.12.42.___FP1___.exit:80
 155 REMAP 41 142.244.12.42.___FP1___.exit:80 SOURCE=EXIT
 155 SUCCEEDED 41 142.244.12.42.___FP1___.exit:80
 155 CLOSED 41 142.244.12.42.___FP1___.exit:80 REASON=DONE
 www.openbsd.org www.openbsd.org.___FP1___.exit "2012-07-04 03:19:02"
 www.openbsd.org.___FP1___.exit 142.244.12.42.___FP1___.exit "2012-06-27
 06:19:02"
 142.244.12.42 142.244.12.42.___FP1___.exit "2012-07-04 03:19:13"


 2) With the undocumented broken format we have...

 mapaddress *.openbsd.org=___FP2___.exit

 Mapaddress is not honored, otherwise same as in (1). Except add
 this to the mapping output:

 *.openbsd.org ___FP2___.exit NEVER


 3) Removal of (2) fails...

 mapaddress *.openbsd.org=*.openbsd.org

 512 syntax error: invalid address '*.openbsd.org'
 [warn] Skipping invalid argument '*.openbsd.org' in MapAddress msg


 4) Addition (documented format) fails...

 mapaddress *.openbsd.org=*.openbsd.org.___FP2___.exit

 512 syntax error: invalid address
 [warn] Skipping invalid argument '*.openbsd.org.___FP2___.exit' in
 MapAddress msg


 5) When this is in torrc (stars)...

 mapaddress *.openbsd.org *.openbsd.org.___FP2___.exit

 this appears in the map (no stars)...

 openbsd.org openbsd.org.___FP2___.exit NEVER

 when I'd expect exactly what is in the torrc to appear.

 However the map is then honored...

 106 NEW 0 www.openbsd.org:80 SOURCE_ADDR=127.0.0.1:63567 PURPOSE=USER
 106 REMAP 0 www.openbsd.org.___FP2___.exit:80 SOURCE=CACHE
 106 SENTCONNECT 38 www.openbsd.org.___FP2___.exit:80
 106 REMAP 38 142.244.12.42.___FP2___.exit:80 SOURCE=EXIT
 106 SUCCEEDED 38 142.244.12.42.___FP2___.exit:80
 106 CLOSED 38 142.244.12.42.___FP2___.exit:80 REASON=DONE
 openbsd.org openbsd.org.___FP2___.exit NEVER
 www.openbsd.org www.openbsd.org.___FP2___.exit "2012-07-04 05:41:34"
 www.openbsd.org.___FP2___.exit 142.244.12.42.___FP2___.exit "2012-06-27
 08:41:38"

 And it still grows this map line on next invocation...

 142.244.12.42 142.244.12.42.___FP2___.exit "2012-07-04 05:41:55"

 And can be removed with 'mapaddress openbsd.org=openbsd.org'. Which
 isn't what we want, as that might be a dynamic or a more specific
 manual static entry. So we really want the stars on this one when
 it's all fixed.


 6) A sighup removes and adds based on torrc. But [re] adding (5)
 does not honor the map while the dynamic map entries from the former
 invocation are still there. ie: sighup doesn't seem to 'signal
 NEWNYM' to clear them out.

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


More information about the tor-bugs mailing list