[tor-bugs] #29231 [Core Tor/Tor]: Relays vastly underreport write-total in padding-counts line in extrainfo descriptor

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 30 16:56:17 UTC 2019


#29231: Relays vastly underreport write-total in padding-counts line in extrainfo
descriptor
--------------------------+------------------------
 Reporter:  arma          |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------

Comment (by dgoulet):

 Two functions are used to count the total read and write bytes:

 {{{
 rep_hist_padding_count_read()
 rep_hist_padding_count_write()
 }}}

 The read one is called for each cell that enters tor within
 `channel_tls_handle_cell()` which is what we want for the total cell
 counter.

 However, for the write counter, it is within
 `connection_or_write_cell_to_buf()` called by `chan->write_cell()`
 function pointer that currently points to
 `channel_tls_write_cell_method()`.

 The problem is that currently, only the channel padding subsystem (netflow
 padding) is using `chan->write_cell()`. Furthermore,
 `connection_or_write_cell_to_buf()` is directly called by:

 * NETINFO cell: `connection_or_send_netinfo()`
 * KEEPALIVE: `run_connection_housekeeping()`
 * Channel `write_cell()` function pointer.

 Thus, we are effectively only counting NETINFO, keepalive (PADDING cell)
 and netflow padding.

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


More information about the tor-bugs mailing list