Looks like tcc doesn't really use **environ to expose the program
environment, so changing the pointer to point elsewhere has no effect.

It's problably not uncommon for setuid programs to use environ=NULL
to drop the untrusted environment. Using tcc to compile such a program
will yeild you a fresh new security hole.

This problem with tcc can be worked around by using clearenv. Except..
clearenv is not POSIX, and eg, FreeBSD does not have a clearenv.

I have ended up with a ifdef __TINYC__ in my code, and a big hunk of
tcc-specific code to work around the problem. And this still does not
help FreeBSD users who also use tcc.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to