Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #30031
Closed
Open
Issue created Apr 05, 2019 by teor@teor

Test circuitpadding with zero monotonic time deltas, and fix any bugs

Any pre-ratchet monotime increment can be zero or negative, because the Windows API and gettimeofday() don't provide monotonic source times.

So after Tor applies the ratchet, any number of calls to the monotonic time functions may return the same value.

We have seen this happen when:

  • Windows sleeps (see https://trac.torproject.org/projects/tor/ticket/23696#comment:13 )
  • macOS has (VM?) time sync issues

We know it can also happen when:

  • Tor uses gettimeofday() and a ratchet to emulate monotime, and the wall clock time goes backwards

But these circumstances are rare:

  1. unit tests like test_util_monotonic_time() pass on Linux, macOS, and Windows CI
  2. Sleeping Windows boxes don't care about padding timing accuracy
  3. macOS VMs are rare
  4. Systems without monotime functions are rare, and clock changes on those systems are also rare
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking