Skip to main content

Race conditions occur when two or more processes attempt to access the same resource simultaneously, leading to unpredictable outcomes.
There are three terms you should be familiar with:

  • Time-of-check (TOC) is the instance when a system verifies access permissions or other security controls.
  • Time-of-use (TOU) is the moment when the system accesses the resource or uses the permission that was granted.
  • The Target of Evaluation (TOE) refers to the particular component, system, or mechanism being evaluated or teste for potential vulnerabilities, such as the system’s method of managing and validating access permissions.

A classic case is the time-of-check to time-of-use (TOC/TOU) flaw, where conditions change between when a resource is checked and when it is used. Attackers can exploit race conditions to escalate privileges or bypass controls. Developers mitigate this risk through synchronization mechanisms, atomic operations, and careful evaluation of concurrency in code.

By addressing these issues, developers protect against some of the oldest yet most powerful forms of exploitation.