[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #31482 [Core Tor/Tor]: Avoid possible overflow when converting between coarse stamp to approx ms
#31482: Avoid possible overflow when converting between coarse stamp to approx ms
-------------------------------------------------+-------------------------
Reporter: teor | Owner: teor
Type: defect | Status:
| assigned
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 |
Parent ID: | Points: 1
Reviewer: nickm | Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):
* reviewer: => nickm
Comment:
Here's a draft fix for initial review:
* master: https://github.com/torproject/tor/pull/1249
Here's my TODO list:
* changes file
* tests for simplify_fraction32()
* tests for monotime_coarse_stamp_units_to_approx_msec() and
monotime_msec_to_approx_coarse_stamp_units(), underflow and overflow
I have some questions:
* do I need to do any extra tests for monotime_init_internal()
* does anyone run our unit tests on iOS?
* how serious is this bug in rate_per_sec_to_rate_per_sec()? Do we
actually use token bucket rates close to 2^30^? Is my math on that limit
correct?
* are there any other callers of
monotime_coarse_stamp_units_to_approx_msec() or
monotime_msec_to_approx_coarse_stamp_units() that might trigger this bug?
* Have I missed anything?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31482#comment:1>
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