/tmp races in gcc.c [Fwd]

Marc Lehmann pcg@goof.com
Thu Jan 22 04:12:00 GMT 1998


>If the temporary filenames are essentially unpredictable (e.g.  pid plus a
>sequence of randomly generated characters), it should defeat this hack and
>reduce the probability of collision to an arbitrarily low value.  In the
>meantime paranoid folks can set TMPDIR to a directory only they can read
>or write (e.g. /root/tmp).  This defeats the hack.

Please don't do this! there are sooo many bad programs out there
using this (bogus!) kind of "fix"...

there is no such thing as a random character sequence (which is accaptable
for implementation in gcc), and you can be sure the exploit for any scheme
you might device is available within hours/days of it's creation..

      -----==-                                              |
      ----==-- _                                            |
      ---==---(_)__  __ ____  __       Marc Lehmann       +--
      --==---/ / _ \/ // /\ \/ /       pcg@goof.com       |e|
      -=====/_/_//_/\_,_/ /_/\_\                          --+
    The choice of a GNU generation                        |
                                                          |



More information about the Gcc mailing list