[tor-bugs] #26196 [Core Tor/Tor]: Abort in test_bridges.c

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 24 21:21:03 UTC 2018


#26196: Abort in test_bridges.c
--------------------------+------------------------------------
 Reporter:  gvanem        |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.5.x-final
Component:  Core Tor/Tor  |        Version:  Tor: unspecified
 Severity:  Normal        |     Resolution:
 Keywords:  crash, tests  |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by teor):

 * cc: catalyst (added)
 * component:  - Select a component => Core Tor/Tor
 * milestone:   => Tor: 0.3.5.x-final


Comment:

 This is a bug that we should fix: we should never access a smart list
 index beyond the used values.

 But it's harmless in practice, because:
 * it's in the unit tests
 * smartlists are initialised with a minimum capacity of 16, and the
 allocation is zero-initialised
 * smartlist allocations never shrink
 * when elements are removed, the index is set to NULL

 To prevent bugs like this in future, we should make unit tests and fragile
 hardening set DEBUG_SMARTLIST.

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


More information about the tor-bugs mailing list