block dlopen of libraries with initial-exec refs to dynamic TLS
authorRich Felker <dalias@aerifal.cx>
Mon, 16 Jul 2018 16:32:57 +0000 (12:32 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 16 Jul 2018 16:32:57 +0000 (12:32 -0400)
commit5c2f46a214fceeee3c3e41700c51415e0a4f1acd
tree1c22945ea0e34d9c6d44da805a3b1206bcabb483
parent5fdccbcd8f080ca6cd2c64cca520805f17af857b
block dlopen of libraries with initial-exec refs to dynamic TLS

previously, this operation succeeded, and the relocation results
worked for access from new threads created after dlopen, but produced
invalid accesses (and possibly clobbered other memory) from threads
that already existed.

the way the check is written, it still permits dlopen of libraries
containing initial-exec references to static TLS (TLS in the main
program or in a dynamic library loaded at startup).
ldso/dynlink.c