]> git.ipfire.org Git - thirdparty/glibc.git/commit - NEWS
Lazy binding failures during dlopen/dlclose must be fatal [BZ #24304]
authorFlorian Weimer <fweimer@redhat.com>
Wed, 27 Nov 2019 15:20:47 +0000 (16:20 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 27 Nov 2019 19:55:35 +0000 (20:55 +0100)
commit79e0cd7b3c997e211fad44a81fd839dc5b2546e8
tree2de9e1bc730bae922d592fa1521aab4f9d65ef01
parent446997ff1433d33452b81dfa9e626b8dccf101a4
Lazy binding failures during dlopen/dlclose must be fatal [BZ #24304]

If a lazy binding failure happens during the execution of an ELF
constructor or destructor, the dynamic loader catches the error
and reports it using the dlerror mechanism.  This is undesirable
because there could be other constructors and destructors that
need processing (which are skipped), and the process is in an
inconsistent state at this point.  Therefore, we have to issue
a fatal dynamic loader error error and terminate the process.

Note that the _dl_catch_exception in _dl_open is just an inner catch,
to roll back some state locally.  If called from dlopen, there is
still an outer catch, which is why calling _dl_init via call_dl_init
and a no-exception is required and cannot be avoiding by moving the
_dl_init call directly into _dl_open.

_dl_fini does not need changes because it does not install an error
handler, so errors are already fatal there.

Change-Id: I6b1addfe2e30f50a1781595f046f44173db9491a
NEWS
elf/Makefile
elf/dl-close.c
elf/dl-open.c
elf/tst-finilazyfailmod.c [new file with mode: 0644]
elf/tst-initfinilazyfail.c [new file with mode: 0644]
elf/tst-initlazyfailmod.c [new file with mode: 0644]