110-avoid-infinite-circuits.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Filename: 110-avoid-infinite-circuits.txt
  2. Title: Avoiding infinite length circuits
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Roger Dingledine
  6. Created: 13-Mar-2007
  7. Status: Open
  8. Overview:
  9. Right now, an attacker can add load to the Tor network by extending a
  10. circuit an arbitrary number of times. Every cell that goes down the
  11. circuit then adds N times that amount of load in overall bandwidth
  12. use. This vulnerability arises because servers don't know their position
  13. on the path, so they can't tell how many nodes there are before them
  14. on the path.
  15. We propose a new set of relay cells that are distinguishable by
  16. intermediate hops as permitting extend cells. This approach will allow
  17. us to put an upper bound on circuit length relative to the number of
  18. colluding adversary nodes; but there are some downsides too.
  19. Motivation:
  20. The above attack can be used to generally increase load all across the
  21. network, or it can be used to target specific servers: by building a
  22. circuit back and forth between two victim servers, even a low-bandwidth
  23. attacker can soak up all the bandwidth offered by the fastest Tor
  24. servers.
  25. The general attacks could be used as a demonstration that Tor isn't
  26. perfect (leading to yet more media articles about "breaking" Tor), and
  27. the targetted attacks will come into play once we have a reputation
  28. system -- it will be trivial to DoS a server so it can't pass its
  29. reputation checks, in turn impacting security.
  30. Design:
  31. We should split RELAY cells into two types: RELAY and RELAY_EXTEND.
  32. Relay_extend cells can only be sent in the first K (say, 10) data
  33. cells sent across a circuit, and only relay_extend cells are allowed
  34. to contain extend requests. We still support obscuring the length of
  35. the circuit (if more research shows us what to do), because Alice can
  36. choose how many of the K to mark as relay_extend. Note that relay_extend
  37. cells *can* contain any sort of data cell; so in effect it's actually
  38. the relay type cells that are restricted. By default, she would just
  39. send the first K data cells over the stream as relay_extend cells,
  40. regardless of their actual type.
  41. Each intermediate server would pass on the same type of cell that it
  42. received (either relay or relay_extend), and the cell's destination
  43. will be able to learn whether it's allowed to contain an Extend request.
  44. If an intermediate server receives a relay_extend cell after it has
  45. already seen k data cells, or if it sees a relay cell that contains an
  46. extend request, then it tears down the circuit (protocol violation).
  47. Security implications:
  48. The upside is that this limits the bandwidth amplification factor to
  49. K: for an individual circuit to become arbitrary-length, the attacker
  50. would need an adversary-controlled node every K hops, and at that
  51. point the attack is no worse than if the attacker creates N/K separate
  52. K-hop circuits.
  53. On the other hand, we want to pick a large enough value of K that we
  54. don't mind the cap.
  55. If we ever want to take steps to hide the number of hops in the circuit
  56. or a node's position in the circuit, this design probably makes that
  57. more complex.
  58. Migration:
  59. Phase one: servers should recognize relay_extend cells and pass them
  60. on just like relay cells. Don't do any enforcement of the protocol
  61. yet. We could do this phase in the 0.2.0 timeline.
  62. Phase two: once support in phase one is pervasive, clients could start
  63. using relay_extend cells when all nodes currently in the circuit would
  64. recognize them. We could conceivably do this phase during 0.2.0 too.
  65. Phase three: once clients that don't use relay_extend cells are
  66. obsolete, servers should start enforcing the protocol.
  67. (Another migration plan would be to coordinate this with proposal
  68. 105's new link versions. Would that be better/worse? Can somebody
  69. sketch out what it might look like?)
  70. Spec:
  71. [We can formalize this part once we think the design is a good one.]
  72. Additional complexity:
  73. Rather than limiting the relay_extend cells to being in the first K
  74. data cells seen, we could instead permit up to K relay_extend cells
  75. in the lifetime of the circuit. This would let us extend the circuit
  76. later on in its life if we decided it was worth doing, though we would
  77. reveal our intent to each node in the circuit when we do.
  78. Acknowledgements:
  79. This design has been kicking around since Christian Grothoff and I came
  80. up with it at PET 2004. (Nathan Evans, Christian Grothoff's student,
  81. is working on implementing a fix based on this design in the summer
  82. 2007 timeframe.)