Block signals during the initial part of dlopen
commita2e8aa0d9ea648068d8be52dd7b15f1b6a008e23
authorFlorian Weimer <fweimer@redhat.com>
Thu, 31 Oct 2019 18:30:19 +0000 (31 19:30 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 27 Nov 2019 19:55:35 +0000 (27 20:55 +0100)
treee076480d85867a6d52938e9e9485c817e26d81b2
parentf63b73814f74032c0e5d0a83300e3d864ef905e5
Block signals during the initial part of dlopen

Lazy binding in a signal handler that interrupts a dlopen sees
intermediate dynamic linker state.  This has likely been always
unsafe, but with the new pending NODELETE state, this is clearly
incorrect.  Other threads are excluded via the loader lock, but the
current thread is not.  Blocking signals until right before ELF
constructors run is the safe thing to do.

Change-Id: Iad079080ebe7442c13313ba11dc2797953faef35
elf/dl-open.c