[tor-bugs] #25616 [Core Tor/Tor]: Non-fatal assertion in hs_desc_encode_descriptor similar to #24972

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Mar 27 14:28:31 UTC 2018


#25616: Non-fatal assertion in hs_desc_encode_descriptor similar to #24972
-------------------------------------------------+-------------------------
 Reporter:  alnsn                                |          Owner:  dgoulet
     Type:  defect                               |         Status:
                                                 |  accepted
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.2.10
 Severity:  Normal                               |     Resolution:
 Keywords:  regression, tor-hs, 032-backport,    |  Actual Points:
  033-must 033-triage-20180326                   |
  033-included-20180326                          |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by dgoulet):

 This is caused because we use a different time source when decoding the
 descriptor from the encoding process. In other words, we encode with
 `time(NULL)` (value coming from the main look scheduled event) and once we
 are done, we try to decode the resulting descriptor to validate where we
 use `approx_time()`. A clock jump in between can make the validation to
 fail.

 Good news is that tor will recover that is fail to build the descriptor
 and a second later will try again but this time with possibly synchronized
 time source.

 Which means that we either remove the `BUG()`, let the error fly and hope
 tor recovers. Or we pass down the same time source to the decoding process
 down the stack which will result in a patch where ~8 functions will be
 changed to pass `now` as a parameter.

 The former is worrying because removing the BUG() might make us miss other
 encode/decode issues. The latter is a bit messy but should fix that issue
 once and for all because we would share the time source for the entire
 encoding descriptor process.

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


More information about the tor-bugs mailing list