TK Study

Multiple choice › Race conditions

Race conditions

1. Race conditions

Two users buy the last ticket at the same moment and both are told the purchase succeeded. This is an example of:

  1. Broken authentication
  2. Cross-site scripting
  3. A race condition
  4. A side-channel attack
Answer

C

Race condition: the outcome depends on the timing of two processes using a shared resource. Fix with locking/atomic transactions.