This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/22745] _nptl_setxid can loop forever if a dlmopen namespace tries to initialise pthreads after the main namespace does
- From: "vivek at collabora dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 09 Feb 2018 19:34:38 +0000
- Subject: [Bug dynamic-link/22745] _nptl_setxid can loop forever if a dlmopen namespace tries to initialise pthreads after the main namespace does
- Auto-submitted: auto-generated
- References: <bug-22745-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22745
--- Comment #8 from Vivek Das Mohapatra <vivek at collabora dot com> ---
So, staring at this code for a while - will the following approach to
cloning an object into a secondary link map work:
- allocate a new entry in the same way as _dl_new_object
- memcpy the contents of the old entry to the new
- set the next and previous pointers to NULL in the new struct
- hook the next and prev pointers up to the new link map list
The existing clone operation for ld.so seems to be a special case
which pokes the real pointer into l_real in a freshly allocated
struct, but doesn't care much about the details as the linker can't
depend on anything and nothing relocates symbols from it (I think?)
[I realise I haven't addressed the dont-apply-uniqueness-to-audit
requirement yet - will look at that once I know how to make it
work at all]
--
You are receiving this mail because:
You are on the CC list for the bug.