From 37a6f9b2be16e693718342bb84a08b43827d9fab Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 6 Jan 2002 21:16:41 +0000 Subject: Add new "SECURITY CONSIDERATIONS" sections. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- lib/libc/stdio/tmpnam.3 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/libc/stdio/tmpnam.3') diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3 index fa61c3d..3538885 100644 --- a/lib/libc/stdio/tmpnam.3 +++ b/lib/libc/stdio/tmpnam.3 @@ -182,9 +182,27 @@ for any of the errors specified for the library functions .Xr malloc 3 or .Xr mktemp 3 . +.Sh SECURITY CONSIDERATIONS +The +.Fn tmpnam +and +.Fn tempnam +functions are susceptible to a race condition, +which allows malicious users +to potentially overwrite arbitrary files in the system, +depending on the level of privilege of the running program. +It is strongly suggested that +.Xr mkstemp 3 +be used in place of these functions. +(See +the FSA.) .Sh SEE ALSO .Xr mkstemp 3 , .Xr mktemp 3 +.Rs +.%T "The FreeBSD Security Architecture" +.%J "/usr/share/doc/{to be determined}" +.Re .Sh STANDARDS The .Fn tmpfile -- cgit v1.1