[tor-bugs] #13207 [Tor]: Is rend_cache_clean_v2_descs_as_dir cutoff crazy high?

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Nov 23 23:23:07 UTC 2014


#13207: Is rend_cache_clean_v2_descs_as_dir cutoff crazy high?
------------------------+--------------------------------
     Reporter:  arma    |      Owner:
         Type:  defect  |     Status:  new
     Priority:  normal  |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:  SponsorR, tor-hs
Actual Points:          |  Parent ID:
       Points:          |
------------------------+--------------------------------

Comment (by arma):

 The relevant code is
 {{{
   /* Is descriptor too old? */
   if (parsed->timestamp < now - REND_CACHE_MAX_AGE-REND_CACHE_MAX_SKEW) {
     log_warn(LD_REND, "Service descriptor with service ID %s is too old.",
              safe_str_client(service_id));
     goto err;
   }
   /* Is descriptor too far in the future? */
   if (parsed->timestamp > now + REND_CACHE_MAX_SKEW) {
     log_warn(LD_REND, "Service descriptor with service ID %s is too far in
 "
                       "the future.", safe_str_client(service_id));
     goto err;
   }
 }}}

 I bet if we set MAX_SKEW to 18 hours, and MAX_AGE to 6 hours, then we'd
 get a lot of what we want here.

 That is, in normal circumstances we'll keep the descriptor for 23 or 24
 hours after it's generated (it's not exactly 24 because check out the
 {{{d->timestamp -= d->timestamp % 3600; /* Round down to nearest hour
 */}}} line in rend_service_update_descriptor()), and accept descriptors
 from hidden services whose time is up to 17 or 18 hours in the future.

 If we wanted to maintain the "up to 24 hours in the future" feature, then
 we would set MAX_AGE to 0 hours, and MAX_SKEW to 24 hours. But that sure
 is unintuitive.

 Actually, I think our best bet here would be to remove REND_CACHE_MAX_AGE
 from existence (i.e. make it 0 and take it out), and come up with a better
 name for REND_CACHE_MAX_SKEW to indicate that it has to do with descriptor
 age too. Any good names?

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


More information about the tor-bugs mailing list