||03-25-2013 10:19 PM
Originally Posted by mreff555
I found this line in the gcc build script. I'm curious about the reason behind it. Can anyone give me an explanation?
# Temporary build location. This should *NOT* be a directory
# path a non-root user could create later...
That was added a long time ago after I read a report about /tmp paths being embedded in libraries, and an audit of the system showed that glibc, gcc, and bind libraries all had strings in them from the build location. My concern was that someone might be able to create a replacement library in the original build location and use it to do evil things, and I seem to recall a report similar to that (maybe for something else), also long ago. I don't know if the danger was real, but the change was made anyway.
Now I'm finding no reference to this through Google, and don't remember where I heard about it. Maybe the old vendor-sec list? It would be interesting to know if something like that was ever possible, certainly.