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

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