[tor-bugs] #13483 [Tor]: rend_consider_services_upload() sets initial next_upload_time which is clobbered when first intro point established?

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Oct 20 03:35:04 UTC 2014


#13483: rend_consider_services_upload() sets initial next_upload_time which is
clobbered when first intro point established?
------------------------------+------------------------------------
 Reporter:  arma              |          Owner:
     Type:  defect            |         Status:  new
 Priority:  normal            |      Milestone:  Tor: 0.2.6.x-final
Component:  Tor               |        Version:
 Keywords:  SponsorR, tor-hs  |  Actual Points:
Parent ID:                    |         Points:
------------------------------+------------------------------------
 In rend_consider_services_upload(), if (!service->next_upload_time), it
 sets
 {{{
       /* The fixed lower bound of 30 seconds ensures that the descriptor
        * is stable before being published. See comment below. */
       service->next_upload_time =
         now + 30 + crypto_rand_int(2*rendpostperiod);
 }}}
 which sure seems to a casual reader like Tor initializes its first upload
 for the hidden service descriptor to be 30 seconds + a random fraction of
 twice the RendPostPeriod. So, an hour give or take.

 But then right below that we check
 {{{
         (service->desc_is_dirty &&
          service->desc_is_dirty < now-30)) {
 }}}

 and the service gets dirty whenever an intro point is established, which
 presumably happens soon after you start up your Tor.

 We should verify that this behavior is what I think it is, and then we
 should at the least fix all the comments to be more accurate, and probably
 we should get rid of the "up to 2 hours" part of the code since it isn't
 working anyway.

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


More information about the tor-bugs mailing list