148-uniform-client-end-reason.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. Filename: 148-uniform-client-end-reason.txt
  2. Title: Stream end reasons from the client side should be uniform
  3. Author: Roger Dingledine
  4. Created: 2-Jul-2008
  5. Status: Closed
  6. Implemented-In: 0.2.1.9-alpha
  7. Overview
  8. When a stream closes before it's finished, the end relay cell that's
  9. sent includes an "end stream reason" to tell the other end why it
  10. closed. It's useful for the exit relay to send a reason to the client,
  11. so the client can choose a different circuit, inform the user, etc. But
  12. there's no reason to include it from the client to the exit relay,
  13. and in some cases it can even harm anonymity.
  14. We should pick a single reason for the client-to-exit-relay direction
  15. and always just send that.
  16. Motivation
  17. Back when I first deployed the Tor network, it was useful to have
  18. the Tor relays learn why a stream closed, so I could debug both ends
  19. of the stream at once. Now that streams have worked for many years,
  20. there's no need to continue telling the exit relay whether the client
  21. gave up on a stream because of "timeout" or "misc" or what.
  22. Then in Tor 0.2.0.28-rc, I fixed this bug:
  23. - Fix a bug where, when we were choosing the 'end stream reason' to
  24. put in our relay end cell that we send to the exit relay, Tor
  25. clients on Windows were sometimes sending the wrong 'reason'. The
  26. anonymity problem is that exit relays may be able to guess whether
  27. the client is running Windows, thus helping partition the anonymity
  28. set. Down the road we should stop sending reasons to exit relays,
  29. or otherwise prevent future versions of this bug.
  30. It turned out that non-Windows clients were choosing their reason
  31. correctly, whereas Windows clients were potentially looking at errno
  32. wrong and so always choosing 'misc'.
  33. I fixed that particular bug, but I think we should prevent future
  34. versions of the bug too.
  35. (We already fixed it so *circuit* end reasons don't get sent from
  36. the client to the exit relay. But we appear to be have skipped over
  37. stream end reasons thus far.)
  38. Design:
  39. One option would be to no longer include any 'reason' field in end
  40. relay cells. But that would introduce a partitioning attack ("users
  41. running the old version" vs "users running the new version").
  42. Instead I suggest that clients all switch to sending the "misc" reason,
  43. like most of the Windows clients currently do and like the non-Windows
  44. clients already do sometimes.