[tor-bugs] #16433 [Torsocks]: infinite recursion in torsocks log timestamps

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 24 02:53:47 UTC 2015


#16433: infinite recursion in torsocks log timestamps
-------------------------+-------------------------
 Reporter:  cypherpunks  |          Owner:  dgoulet
     Type:  defect       |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Torsocks     |        Version:
 Keywords:  netbsd       |  Actual Points:
Parent ID:               |         Points:
-------------------------+-------------------------
 If libc calls `open` and `close` in order to deal with time zones for
 `localtime`, the torsocks interception of `close` may lead to infinite
 recursion: torsocks `close` tries to print a log message, which needs a
 timestamp, which it formats with `localtime`, which opens the tz database
 and calls `close` when done, which tries to print a log message, which
 needs a timestamp...

 (NetBSD's libc is an example of such a libc.  Note `gmtime` has the same
 property.)

 The attached patch changes timestamps to be seconds since epoch minus leap
 seconds, i.e. a standard POSIX clock, in order to avoid this recursion.

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


More information about the tor-bugs mailing list