Distribution of security fixes
Posted Aug 26, 2004 11:41 UTC (Thu) by
rwmj (guest, #5474)
Parent article:
Distribution of security fixes
Unfortunately the maintainer of glibc isn't very receptive to problems with LD_* environment variables and setuid or other processes.
For example, for the longest time, having an empty path in LD_LIBRARY_PATH means that the current directory is searched for libraries. eg. If LD_LIBRARY_PATH accidentally contains :/usr/local/lib then the current directory is always checked for libraries before any other directory.
This happens because sys admins do things like:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
and put it in the system-wide profile scripts (note what happens if LD_LIBRARY_PATH is empty to begin with). If you have a sysadmin who's made this simple mistake, then it's trivial to take over the system - create a library like libtermcap.so containing trojan code, drop it into /tmp, and just wait. As soon as anyone types 'ls' in /tmp, they're running your code.
There's a simple and obvious fix - ignore empty elements in LD_LIBRARY_PATH. If the sysadmin is stupid enough to want the current directory searched, let them specify a library path of "." explicitly.
The maintainer of glibc does not see this bug as a bug which requires fixing. Instead he would prefer all sysadmins in the world to vet their profile scripts carefully.
Rich.
(
Log in to post comments)