[tor-bugs] #11342 [Tor]: dump_desc() can trigger "write_str_to_file(): Bug: We're writing a text string that already contains a CR" on Windows

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Mar 28 02:10:44 UTC 2014


#11342: dump_desc() can trigger "write_str_to_file(): Bug: We're writing a text
string that already contains a CR" on Windows
--------------------+------------------------------------
 Reporter:  arma    |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:  Tor: 0.2.5.x-final
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 dump_desc() calls write_str_to_file() with bin==0, which on Windows causes
 an LD_BUG warn if the thing you're writing has a \r in it.

 In this case, we're writing the thing because it came from the network and
 we couldn't parse it. So we could totally give a Windows relay or client a
 thing that they can't parse which has a \r in it, causing this LD_BUG log
 to trigger.

 Noticed by looking at #11233. Unclear if it's the same location as was
 triggered in that bug though.

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


More information about the tor-bugs mailing list