[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #4251 [Tor Hidden Services]: memory leak for hidden service?
#4251: memory leak for hidden service?
---------------------------------+------------------------------------------
Reporter: arma | Owner: rransom
Type: defect | Status: accepted
Priority: normal | Milestone: Tor: 0.2.2.x-final
Component: Tor Hidden Services | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
Changes (by rransom):
* milestone: => Tor: 0.2.2.x-final
Comment:
Replying to [ticket:4251 arma]:
> I ran moria1 under valgrind and it identified the following leak:
{{{
==29415== by 0x42C579: rend_services_introduce (rendservice.c:1347)
==29415== by 0x46CFB2: circuit_build_needed_circs (circuituse.c:708)
}}}
src/or/rendservice.c:1347 is in `rend_service_launch_establish_intro`:
{{{
launched->rend_data = tor_malloc_zero(sizeof(rend_data_t));
}}}
When a service-side intro circuit opens and we already have enough intro
points for its HS, we set its purpose to `CIRCUIT_PURPOSE_C_GENERAL` (in
`rend_service_intro_has_opened`), but do not free and clear its
`rend_data` field. Fortunately, your Tor instance cannibalized that
circuit for use as a hidden-service-related circuit and allocated a new
`rend_data` for it, thereby leaking the old `rend_data`'s memory, while it
was running under valgrind. Nice catch!
Bugfix probably on 0.0.6, when hidden services were introduced, but I
should check that before I put it in a changes/ file. Setting milestone
to 0.2.2.x.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4251#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs