Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In many older implementations, the name is a function of process ID and time, so it is possible for the attacker to predict the name and create a decoy in advance. FreeBSD changed the mk*temp() family to eliminate the process ID component of the file name and replace the entire field with base-62 encoded randomness. This raises the number of possible temporary files for the typical use of six X's significantly, meaning that even mktemp() with six X's is reasonably (probabilistically) secure against guessing except under frequent usage [Kennaway 2000].

Exceptions

FIO43FIO21-EX1: The Annex K tmpfile_s() function can be used if all the targeted implementations create temporary files in secure directories.

...

...