This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/13579] do_lookup_x may access dangling memory
- From: "carlos_odonell at mentor dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 06 Apr 2012 03:17:35 +0000
- Subject: [Bug dynamic-link/13579] do_lookup_x may access dangling memory
- Auto-submitted: auto-generated
- References: <bug-13579-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13579
--- Comment #5 from Carlos O'Donell <carlos_odonell at mentor dot com> 2012-04-06 03:17:35 UTC ---
Is there a clear description of exactly the problem solved by the patch? This
looks like a serious problem that we need to fix, but I have not seen a clear
"What problem are your solving?" kind of description of the problem and how the
fix relates.
It appears that the patch does:
* In _dl_close_worker we don't swap back the old l_orig_initfini maps (is this
what was causing the access to dangling memory?) we made at startup, and we
don't free the current l_initfini maps we were using (they will get freed
elsewhere).
* In _dl_map_object_deps we immediately free the old l_initfini maps instead of
saving them to l_orig_initfini. We also use a new flag l_free_initfini to mark
that the maps were dynamically allocated and need to be free'd.
* Given that we free the old l_initfini immediately, we only have the current
l_initfini to free when l_free_initfini is 1, and that is done in
libc_freeres_fn.
This seems logical and the change looks correct.
However, what was *actually* wrong with the original implementation?
Was it the swapping back of the l_orig_initfini?
What is wrong with the old l_orig_initfini?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.