[tor-bugs] #28614 [Core Tor/Tor]: Can't parse networkstatus consensus time

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 29 11:19:17 UTC 2019


#28614: Can't parse networkstatus consensus time
-------------------------------------------------+-------------------------
 Reporter:  Vort                                 |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.0.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  040-rc-must, regression,             |  Actual Points:
  postfreeze-ok, tbb-needs                       |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by arma):

 Hint: in maint-0.3.5's src/feature/nodelist/networkstatus.c's
 networkstatus_read_cached_consensus_impl(), we call
 {{{
   char *result = read_file_to_str(filename, RFTS_IGNORE_MISSING, NULL);
 }}}
 Note that we don't pass it the RFTS_BIN flag, which means
 tor_open_cloexec()'s open() ultimately uses O_TEXT rather than O_BINARY
 for its flags.

 But 0.4.0's networkstatus_map_cached_consensus_impl()'s tor_mmap_file()
 doesn't have the same Windows notion of O_TEXT.

 And on Linux, open() doesn't care if it's binary or text because they're
 the same thing, so Linux (and really everything other than Windows)
 continued to work when we shifted from text to binary in 0.4.0.

 Of course, for extra fun notice that we seem to have a Windows-specific
 mmap implementation: see the #elif _WIN32 version of tor_mmap_file().

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


More information about the tor-bugs mailing list