[tor-bugs] #31482 [Core Tor/Tor]: Avoid possible overflow when converting between coarse stamp to approx ms

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Oct 21 12:45:11 UTC 2019


#31482: Avoid possible overflow when converting between coarse stamp to approx ms
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  teor
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.2.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.4.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  035-backport, 040-backport,          |  Actual Points:  0.5
  041-backport, 042-should                       |
Parent ID:                                       |         Points:  1
 Reviewer:  nickm                                |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 Work in progress draft:
 * 0.3.5: https://github.com/torproject/tor/pull/1435

 Done:
 * rebase to 0.3.5
 * tests for simplify_fraction32()

 In Progress:
 * tests for monotime_coarse_stamp_units_to_approx_msec() and
 monotime_msec_to_approx_coarse_stamp_units()
   * more values
   * precise and approximate cases, and their boundary conditions
   * underflow and overflow (close to 2^30^ ?)

 TODO:
 * do a GCD calculation on Windows init
 * refactor and extra tests for monotime_init_internal()
 * changes file

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


More information about the tor-bugs mailing list