On 7/23/25 9:06 AM, Dr. Werner Fink wrote:
On 2025/07/23 14:53:23 +0200, Dr. Werner Fink wrote:

The problem is the LD_PRELOAD use in the libssh test suite

with HAVE_SETRESUID and HAVE_SETRESGID enabled the call

LD_PRELOAD=/usr/lib64/libsocket_wrapper.so:/usr/lib64/libnss_wrapper.so:/usr/lib64/libuid_wrapper.so:/usr/lib64/libpam_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libchroot_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libfs_wrapper.so
 ./bash
Segmentation fault         (core dumped) 
LD_PRELOAD=/usr/lib64/libsocket_wrapper.so:/usr/lib64/libnss_wrapper.so:/usr/lib64/libuid_wrapper.so:/usr/lib64/libpam_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libchroot_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libfs_wrapper.so
 ./bash

does segfault whereas HAVE_SETRESUID and HAVE_SETRESGID disabled

LD_PRELOAD=/usr/lib64/libsocket_wrapper.so:/usr/lib64/libnss_wrapper.so:/usr/lib64/libuid_wrapper.so:/usr/lib64/libpam_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libchroot_wrapper.so:/home/abuild/rpmbuild/BUILD/libssh-test-0.11.2-build/libssh-0.11.2/build/lib/libfs_wrapper.so
 strace -s 4096 -o log ./bash
abuild@noether:/mnt>

it works

Can be reduced to

   LD_PRELOAD=/usr/lib64/libuid_wrapper.so ./bash

So running a version of bash configured to use a working version of
setresuid/setresgid from libc breaks (or finds a bug in) libuid_wrapper
by calling those functions.

Well, maybe you want to configure bash using the same wrapper library.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to