[tor-bugs] #20262 [- Select a component]: Onion services startup time always gets revealed
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Sep 29 22:50:50 UTC 2016
#20262: Onion services startup time always gets revealed
--------------------------------------+-----------------
Reporter: twim | Owner:
Type: defect | Status: new
Priority: Medium | Milestone:
Component: - Select a component | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
--------------------------------------+-----------------
Due to dead code in `rend_consider_services_upload()` startup time of
onion services always gets revealed.
If service descriptor is not uploaded yet we add random delay from
[rendinitialpostdelay;rendinitialpostdelay+rand(2*rendpostperiod)] (
[30s;30s+2h] ):
{{{
if (!service->next_upload_time) {
service->next_upload_time =
now + rendinitialpostdelay + crypto_rand_int(2*rendpostperiod);
}}}
But this delay is useless when we're checking whether we should upload:
{{{
if (intro_points_ready &&
(service->next_upload_time < now ||
(service->desc_is_dirty &&
service->desc_is_dirty < now-rendinitialpostdelay))) {
/* Upload */
}}}
Because descriptor is dirty for never-yet-uploaded services it always gets
uploaded after being stable for `rendinitialpostdelay` seconds.
`next_upload_time` is further in future than `rendinitialpostdelay`
stabilization stuff.
So it goes.
I made a patch to unbork this function to work properly.
But it raised a problem. We got used to expect that descriptors are going
to be uploaded pretty soon. But 'now' they will be uploaded with delay up
to 2h. That's not okay. Should we make a `torrc` option like
`RevealOnionServiceStartupTime` that defaults to 1?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20262>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list