What about mkstemp vs. mktemp in binutils?
Alan Modra
amodra@bigpond.net.au
Sun Feb 17 04:18:00 GMT 2002
On Sun, Feb 17, 2002 at 11:35:24AM +0100, Christian Jönsson wrote:
> /home/chj/src/objdir/binutils/../../binutils/bucomm.c:236: the use of `mktemp' is dangerous, better use `mkstemp'
>
> Is this something to worry about?
Don't panic, but there is a possible security hole opened by using
mktemp. The problem being that between mktemp deciding that a given
name in /tmp is OK for a temp file and actually opening the file,
someone could insert a symbolic link with that name pointing to
something like /etc/passwd. You don't compile as root, do you?
--
Alan Modra
IBM OzLabs - Linux Technology Centre
BTW, you need to fix your Mail-Followup-To.
More information about the Binutils
mailing list