.Unrelocated and uninitialized shared objects no longer result in failures if `dlopen` fails
Previously, if the `dlopen` call failed, the `glibc` dynamic linker did not remove shared objects with the `NODELETE` mark before reporting the error. Consequently, the unrelocated and uninitialized shared objects remained in the process image, eventually resulting in assertion failures or crashes. With this update, the dynamic loader uses a pending `NODELETE` state to remove shared objects upon `dlopen` failure, before marking them as `NODELETE` permanently. As a result, the process does not leave any unrelocated objects behind. Also, lazy binding failures while ELF constructors and destructors run now terminate the process.
Unsure if it is a samba bug, but it should not crash.
Steps to reproduce:
* Base 7.3 install
* yum install samba-winbind
* edit /etc/nsswitch.conf to show the following host line:
hosts: files wins dns myhostname
* systemctl start winbind
* ping redhat.com
"Quick fix" could be to have /usr/lib64/samba/ in
LD_LIBRARY_PATH.
The proper fix would likely to fix libnss_wins.so.2
link. Please let me know if the bug should be reassigned
to samba.
$ ldd /lib64/libnss_wins.so.2
linux-vdso.so.1 => (0x00007ffefcf2d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f683cd2a000)
libwbclient.so.0 => /lib64/libwbclient.so.0 (0x00007f683cb1b000)
libreplace-samba4.so => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f683c759000)
/lib64/ld-linux-x86-64.so.2 (0x00007f683d15e000)
libwinbind-client-samba4.so => /usr/lib64/samba/libwinbind-client-samba4.so (0x00007f683c555000)
libreplace-samba4.so => /usr/lib64/samba/libreplace-samba4.so (0x00007f683c351000)
This is both a Samba bug (wrong search path/DSO location) and glibc bug (we should report and error and not crash).
This is fixed upstream. The fix involves some ld.so cleanup, but should be backportable.
(In reply to Florian Weimer from comment #18)
> Upstream testing revealed that the fix is incomplete. We need to backport
> the fix for this bug as well:
> https://sourceware.org/bugzilla/show_bug.cgi?id=25396
These fixes are included in glibc-2.28-101.el8.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:1828