[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #16433 [Torsocks]: infinite recursion in torsocks log timestamps
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs