[tor-bugs] #7351 [Tor]: Implement proposal 214: 4-byte circuid IDs

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 8 19:41:23 UTC 2013


#7351: Implement proposal 214: 4-byte circuid IDs
-------------------------+--------------------------------------------------
 Reporter:  nickm        |          Owner:                    
     Type:  enhancement  |         Status:  needs_revision    
 Priority:  normal       |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor          |        Version:                    
 Keywords:  tor-relay    |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------
Changes (by andrea):

  * status:  needs_review => needs_revision


Comment:

 If there's a possible DoS I think we need to do this, but there are too
 many magic constants in this code for me as-is.  For example, in
 fetch_var_cell_from_buf():

 const unsigned header_len = wide_circ_ids ? VAR_CELL_MAX_HEADER_SIZE :
 VAR_CELL_MAX_HEADER_SIZE - 2;

 There are also similar constructions in fetch_var_cell_from_evbuffer(),
 channel_tls_write_packed_cell_method(), connection_bucket_read_limit(),
 connection_bucket_write_limit(), var_cell_pack_header(),
 connection_or_flushed_some(), or_handshake_state_record_cell(),
 connection_or_write_cell_to_buf() and
 connection_or_process_cells_from_inbuf().  I think we should have a set of
 inline functions or macros of the form get_cell_size(linkproto),
 get_max_var_cell_size(linkproto), etc. instead.  Maybe also
 get_circid_len_for_channel() instead of things like "const int
 wide_circ_ids = linkproto >= MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS; const int
 circ_id_len = wide_circ_ids ? 4 : 2;"

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


More information about the tor-bugs mailing list