[tor-bugs] #26435 [Core Tor/Tor]: memory leak in parse_protocol_list

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 20 22:56:52 UTC 2018


#26435: memory leak in parse_protocol_list
-------------------------------------+------------------------------------
 Reporter:  arma                     |          Owner:  (none)
     Type:  defect                   |         Status:  new
 Priority:  High                     |      Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor             |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:  033-backport regression  |  Actual Points:
Parent ID:                           |         Points:
 Reviewer:                           |        Sponsor:
-------------------------------------+------------------------------------

Comment (by arma):

 I've restarted moria1 with this patch:
 {{{
 diff --git a/src/or/protover.c b/src/or/protover.c
 index e4efe0a..a02b9d1 100644
 --- a/src/or/protover.c
 +++ b/src/or/protover.c
 @@ -283,9 +283,11 @@ parse_protocol_list(const char *s)
  bool
  protover_contains_long_protocol_names(const char *s)
  {
 -  if (!parse_protocol_list(s))
 -    return true;
 -  return false;
 +  smartlist_t *list = parse_protocol_list(s);
 +  if (!list)
 +    return true; /* yes, has a dangerous name */
 +  smartlist_free(list);
 +  return false; /* no, looks fine */
  }

  /**
 }}}

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


More information about the tor-bugs mailing list