[tor-bugs] #33039 [Core Tor/Tor]: Memory leaks in handle_control_getconf

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 24 03:52:08 UTC 2020


#33039: Memory leaks in handle_control_getconf
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:
                                                 |  catalyst
     Type:  defect                               |         Status:
                                                 |  accepted
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  043-must, memory-leak, regression,   |  Actual Points:
  tor-tests-coverage                             |
Parent ID:                                       |         Points:  1
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by catalyst):

 Replying to [comment:4 nickm]:
 > I haven't tested this, but it looks like maybe the cleanup code in
 getconf is incorrect?  It's doing:
 > {{{
 >   SMARTLIST_FOREACH(answers, char *, cp, tor_free(cp));
 > }}}
 > but I don't think that the "answers" smartlist is actually a list of
 strings?

 Thanks, that's what I meant by deleting the incorrect frees. I'm pretty
 sure the mismatch in free functions is the problem; I just can't get
 LeakSanitizer to show the leaks, even though it shows them for a minimal
 test program. Also Xenial isn't helping. Going to try valgrind on Xenial.

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


More information about the tor-bugs mailing list