[tor-bugs] #24666 [Core Tor/Tor]: sched: Store the circuit ID instead of the full DESTROY cell in the destroy queue

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Dec 20 17:02:13 UTC 2017


#24666: sched: Store the circuit ID instead of the full DESTROY cell in the destroy
queue
-------------------------------------------------+-------------------------
 Reporter:  dgoulet                              |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Very High                            |      Milestone:  Tor:
                                                 |  0.3.2.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-sched, tor-cell,                 |  Actual Points:
  backport-031,backport-030, backport-029,       |
  backport-028, backport-025                     |
Parent ID:                                       |         Points:
 Reviewer:  dgoulet                              |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by dgoulet):

 * status:  needs_review => needs_revision
 * reviewer:   => dgoulet


Comment:

 * `destroy_cell_to_packed_cell()` is supposed to free the `destroy_cell_t`
 but doesn't leading to memory leak.

  Seems a simple `tor_free(inp)` is required.

 * The `inserted_time` seems not used at all. I bet it will be useful later
 especially with the OOM but as a fix that we will be backported, I think
 we could reduce the size even more by removing it?

 * This snippet I think could use a comment that says that the destroy
 queue can NOT be empty since the `pop()` can return NULL and
 `circuitmux_get_first_active_circuit()` only returns a queue with > 0
 value.

 {{{
 +      dcell = destroy_cell_queue_pop(destroy_queue);
 +      tor_assert(dcell);
 }}}

 Rest lgtm;

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


More information about the tor-bugs mailing list