[tor-bugs] #19317 [Metrics/CollecTor]: Sanitize TCP ports in bridge descriptors

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 15 19:35:59 UTC 2016


#19317: Sanitize TCP ports in bridge descriptors
-------------------------------+------------------------------
 Reporter:  karsten            |          Owner:
     Type:  enhancement        |         Status:  needs_review
 Priority:  Medium             |      Milestone:
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:                     |  Actual Points:
Parent ID:                     |         Points:
 Reviewer:                     |        Sponsor:
-------------------------------+------------------------------

Comment (by iwakeh):

 In general, I think what is defined above is ok. Some some port changes
 could be lost, but that's ok for the sanitation objective.
 There are surely many ways to derive the obfuscated port number, we just
 have to choose one and the above seems fine.

 I would suggest to also change the comments in code and default properties
 to state that both ip and port will be hashed.

 And, should the unhashed default of port 1 be changed to some number above
 1024, b/c of Atlas?


 Some asides about the SanitzedBridgeWriter:
 Now looking at the entire class I noticed first off all that I missed some
 hard-coded paths when doing the configuration change. => New issue #19424,
 which has time to wait for the port sanitation to finish.

 Second, it might be better to access the secrets file in try-with-
 resources statements, maybe using the java7 idiom of
 `Files.newBufferedReader` in `java.nio.file`.

 Some catch statements could be combined to multi-catch.

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


More information about the tor-bugs mailing list