lkml.org 
[lkml]   [1998]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpredictable filenames problem

On Thu, 26 February 1998, Miguel de Icaza wrote:
> In this specific case, the random PIDs will help make it harder to
> exploit a bunch of attacks on predictable filenames (all of our
> userland should be using mkstemp instead of mktemp eventually, just
> like OpenBSD).

On the predictable filenames issue: anyone considered having a system
call that creates a temporary file that doesn't have a directory entry
(just allocates an inode for it on the file system and returns a file
descriptor)? This will create a file that will start directly in the
state files normally are after the following sequence:

fd = open("/tmp/unique_file_name", ...);
remove("/tmp/unique_file_name");

but without the directory entry for /tmp/unique_file_name actually
being created. Of course, the system call will need the path
parameter in order to know on what file system the file should be
created.

I am aware that:

1. No aplication will initialy use it (and even if they eventually
will, it's going to be Linux specific code).

2. It won't solve the problem for programs that use temporary files to
communicate with their children (gcc without -pipe).

Still, it might improve security on Linux.

Tudor

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.418 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site