[tor-bugs] #29990 [Core Tor/Tor]: Handle zero monotonic time differences in the circuit padding code
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Apr 5 00:23:13 UTC 2019
#29990: Handle zero monotonic time differences in the circuit padding code
-------------------------------------------------+-------------------------
Reporter: teor | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor:
| 0.4.1.x-final
Component: Core Tor/Tor | Version: Tor:
| unspecified
Severity: Normal | Resolution:
Keywords: wtf-pad, tor-relay, tor-cell, | Actual Points:
padding, 041-must |
Parent ID: #29500 | Points: 2
Reviewer: | Sponsor:
| Sponsor2
-------------------------------------------------+-------------------------
Comment (by mikeperry):
Aha, I think I found it! Our mocking forces us to call monotime_init()
*before* we set the mocked time value. monotime_init() thus stores the
first ratchet value at whatever the platform is at, and then we set fake
mocked time to some later value.
If monotime_init() gets a value from the host that is **greater** than
what we choose to mock time at for our unittests, all subsequent
monotime_abosolute() calls return zero.
So, the right way to fix all of this mess is to either fix our mocking to
allow us to call monotime_init() with a mocked time, or just always set
our mocked time to some time after whatever monotime_init() stored.
I am going to attempt the later, to see if it fixes whatever hackintosh VM
is involved here (I don't have one of those).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29990#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list