Spotting the Sin Pattern

Race conditions are commonly found under the following conditions:

  • More than one thread or process must write to the same resource. The resource could be shared memory, the file system (for example, by multiple web applications that manipulate data in a shared directory), other data stores like the Windows registry, or even a database. It could even be a shared variable!

  • Creating files or directories in common areas, such as directories for temporary files (like /tmp and /usr/tmp in UNIX-like systems).

  • Signal handlers.

  • Nonreentrant functions in a multithreaded application or a signal handler. Note that signals are close to useless on Windows systems and arent susceptible to this problem.



19 Deadly Sins of Software Security. Programming Flaws and How to Fix Them
Writing Secure Code
ISBN: 71626751
EAN: 2147483647
Year: 2003
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net