Briefly describe race conditions in file access.

What will be an ideal response?


Race condition is a common attack exploit. In general, it is a where an attacker can "race in" and change something between two actions in your program. The goal is to make your program misbehave. As mentioned in the previous section, a common race condition arises when testing for file existence using code such as:

unless (-e $myfilename) # bad practice
{
open(FH, "> $myfilename");
}

In this case, there is a race between testing whether or not the file exists and opening it for writing. There is no guarantee that the answer returned by the -e test will still be valid by the time the open is called. An attacker can replace the file with a link to something important and cause the code to erase that file.

Computer Science & Information Technology

You might also like to view...

What is a reference work of data about data compiled by systems analysts?

A) data dictionary B) data flow diagrams C) structured analysis D) design

Computer Science & Information Technology

You can open the CSS Rule definition dialog box by double-clicking a rule name on the CSS Styles panel.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

____________________ smoothes the edges of text displayed on the computer screen.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following would not produce the correct monthly payment on a loan of $13,000 which will be paid off in 5 years with an annual interest rate of 6%?

A) =PMT(.5%,60,-13000 ) B) =PMT(6%/12,60,-13000) C) =PMT(6%,60,-13000 ) D) =PMT(.5%,5*12,-13000)

Computer Science & Information Technology