[tor-bugs] #12500 [Tor]: Slay hidden service upload time dragons

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jun 30 21:12:32 UTC 2014


#12500: Slay hidden service upload time dragons
------------------------------------------+--------------------------------
 Reporter:  andrea                        |          Owner:
     Type:  defect                        |         Status:  new
 Priority:  normal                        |      Milestone:  Tor:
Component:  Tor                           |  0.2.6.x-final
 Keywords:  026-triaged-1 026-deferrable  |        Version:  Tor:
Parent ID:                                |  0.2.5.5-alpha
                                          |  Actual Points:
                                          |         Points:
------------------------------------------+--------------------------------
 #4243 is bullshit; it doesn't seem to describe the actual behavior, but
 what it describes would be the correct thing if it were what we did.  We
 should investigate this and render it sane.

 Descriptor upload happens from rend_consider_services_upload(time_t now) -
 some things to consider:

 1.) Where does now come from?  Is this another thing that should use
 CLOCK_MONOTONIC when available?

 2.) Looks like we correctly randomize the upload time for new descriptors:

 {{{
 3239     if (!service->next_upload_time) { /* never been uploaded yet */
 3240       /* The fixed lower bound of 30 seconds ensures that the
 descriptor
 3241        * is stable before being published. See comment below. */
 3242       service->next_upload_time =
 3243         now + 30 + crypto_rand_int(2*rendpostperiod);
 3244     }
 }}}

 ...but we make our decision on what to upload based on next_upload_time or
 desc_is_dirty:

 {{{
 3245     if (service->next_upload_time < now ||
 3246         (service->desc_is_dirty &&
 3247          service->desc_is_dirty < now-30)) {
 3248       /* if it's time, or if the directory servers have a wrong
 service
 3249        * descriptor and ours has been stable for 30 seconds, upload a
 3250        * new one of each format. */
 3251       rend_service_update_descriptor(service);
 3252       upload_service_descriptor(service);
 3253     }
 }}}

 We should look at how desc_is_dirty gets set and make sure this doesn't
 cause newly created HS descriptors to always be immediately uploaded.

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


More information about the tor-bugs mailing list