[tor-bugs] #17750 [Tor]: A download_status_t can be used before calling download_status_reset on it

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 4 02:18:28 UTC 2015


#17750: A download_status_t can be used before calling download_status_reset on it
-----------------------------+--------------------------------
     Reporter:  teor         |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  Medium       |  Milestone:  Tor: 0.2.8.x-final
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:  easy, review
Actual Points:               |  Parent ID:
       Points:               |    Sponsor:
-----------------------------+--------------------------------
 If this happens, 0 (or uninitialised data) is used instead of the zeroth
 schedule item. (This matters most for bridges, which have schedules that
 start at 60 rather than 0.)

 I wonder if any of the existing Tor code does this?

 We could set a flag in download_status_t to 1 in download_status_reset,
 then assert it's set in the low-level functions that take a
 download_status_t:
 * find_dl_schedule_and_len
 * download_status_increment_failure
 * (not download_status_reset, it sets the flag)
 * download_status_get_n_failures
 * download_status_get_next_attempt_at

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


More information about the tor-bugs mailing list