Subject: bin/2682: setuid dynamic objects ignore compiled-in library paths
To: None <gnats-bugs@NetBSD.ORG>
From: Michael Graff <email@example.com>
Date: 08/09/1996 20:24:32
>Synopsis: setuid dynamic objects ignore compiled-in library paths
>Responsible: bin-bug-people (Utility Bug People)
>Arrival-Date: Fri Aug 9 20:50:01 1996
>Originator: Michael Graff
flame.org: yes, we do know everything
System: NetBSD kechara.flame.org 1.2A NetBSD 1.2A (ZHANEEL) #4: Mon Jul 29 16:51:24 EDT 1996 firstname.lastname@example.org:/u1/netbsd/src/sys/arch/i386/compile/ZHANEEL i386
When a program is compiled and the location of shared libraries are
specified on the link line, if the program is setuid these compiled-in
search paths are excluded from search.
Since the executable has this search path compiled in, it seems to be ok
to allow it to be searched since, if the user can modify this path or the
contents in the directory, the system is already in trouble.
Compile a program which uses a private shared library in /tmp with:
cc -Wl,R -Wl/tmp foo.c
Make the file setuid some other user, and the library cannot be found.