Even though some critical security steps are lacking and some of the steps are cer-
tainly not ideal, this scenario provides a simple context for us to examine race conditions
more closely. Consider the following questions with respect to the scenario:
■
What happens if the file does not exist in step 2, but before step 3 is executed
the attacker creates a symbolic link from that file to a file the attacker controls,
such as another file in the /tmp directory? (A symbolic link is similar to a
pointer; it allows a file to be accessed under a different name via a potentially
different location. When a user attempts to access a file that is actually a sym-
bolic link, the user is redirected to the file that is linked to. Because of this
redirection, all file per ...