Bugtraq mailing list archives
Re: /dev/tcp, and a LD_LIBRARY_PATH question.
From: hoodr () hoodr slip netcom com (hoodr () hoodr slip netcom com)
Date: Fri, 2 Dec 1994 19:28:20 +0000
Second question: How can I write a program that keeps the LD_LIBRARY_PATH variable from being exploited? i.e. the SUN 'login' bug where LD_LIBRARY_PATH got exploited. I would ASSUME I could prevent this by doing something like: putenv("LD_LIBRARY_PATH"), but that just seems too simple to be a true fix. (If it's not complex, it's not right? :)
Don't assume that LD_LIBRAY_PATH is the only variable you have to worry about. I was able to easily break "sudo" with the LD_PRELOAD variable (we've since fixed it by supplying a brand new environment, instead of re-using the old one). A strings on /usr/lib/ld.so, show the following items which are most likley environment variables: LD_LIBRARY_PATH LD_TRACE_LOADED_OBJECTS LD_PROFILE LD_PRELOAD LD_SYMBOLS_PUBLIC Of course only LD_LIBRARY_PATH seems to be documented in the man pages. Maybe someone from Sun can comment on what the rest of these do (please?)
From experimentation, the LD_PRELOAD variable should point to a
library (not a directory of libraries). That library will be loaded before the standard library path (or LD_LIBRARY_PATH) is searched.
Current thread:
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. hoodr () hoodr slip netcom com (Dec 02)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Rens Troost (Dec 03)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Pat Myrto (Dec 03)
- <Possible follow-ups>
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. jim () Tadpole COM (Dec 02)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Ken Descoteaux (Dec 05)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Casper Dik (Dec 06)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Doug Hughes (Dec 05)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Bonfield James (Dec 06)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Todd C. Miller (Dec 06)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Bonfield James (Dec 06)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. hoodr () hoodr slip netcom com (Dec 05)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. James R. Ault (Dec 06)
(Thread continues...)
- Re: /dev/tcp, and a LD_LIBRARY_PATH question. Rens Troost (Dec 03)