In-depth lesson · Race condition
Root causes
Every point the Race condition reports back under this heading, best-backed first, each with the reports it is seen in.
-
The limit check and the creation step were not atomic, so concurrent requests all passed the check
Seen in 7 reports
-
The code checked whether an entry was a symlink and then deleted or wrote it, allowing a swap between check and use
Seen in 6 reports
-
The check-and-record step was not atomic, so concurrent duplicate requests were all accepted
Seen in 4 reports
-
The vote endpoint did not use an atomic operation or lock, so concurrent requests bypassed the duplicate-vote check
Seen in 3 reports
-
The redemption process was not locked or serialised, so several requests validated and applied the same coupon or card before the balance updated
Seen in 3 reports
-
The join endpoint checked for existing membership and inserted without an atomic operation, creating duplicate records
Seen in 3 reports
-
The payment code did not lock or check payout state when two requests arrived close together
Seen in 2 reports
-
Email change and verification were not performed in a single transaction, so verification of one email applied to a different change
Seen in 2 reports
-
A global buffer shared between threads was accessed without a mutex while a signal-driven timeout path could run concurrently
Seen in 2 reports
-
Privileged file operations inside a container or cluster were not isolated from concurrent manipulation
-
Vote and entry counting was not atomic per account
-
Transaction handling in the node or faucet was not atomic
Seen in 2 reports
-
$5,000 -
$5,000 Critical
-
-
The server checked whether a claim was used and then applied the bonus as separate non-atomic steps
-
The approval endpoint lacked locking or atomicity, so concurrent requests both passed the already-approved check
Seen in 1 report
-
Approval removal after a new commit was processed asynchronously, leaving a window where merge was still allowed
Seen in 1 report
-
The check for an already submitted flag and the point award were separate steps without atomicity
Seen in 1 report
-
Parallel reset requests were not treated as a single operation, so cancelling one did not invalidate the others
Seen in 1 report
-
The balance check and deduction were not locked or serialised during concurrent transfers
Seen in 1 report
-
The balance was queried and the transfer sent as separate non-atomic steps, so concurrent requests read the same pre-transfer balance
Seen in 1 report
-
$5,000 Critical
-
-
Eligibility check and purchase were processed without an atomic lock, so parallel requests with different parameters each passed
Seen in 1 report
-
The subscriber count was checked without locking or atomic enforcement, so concurrent requests all passed
Seen in 1 report
-
No database-level constraint prevented cyclic parent-child relationships, and application-level validation could be bypassed by concurrent requests
Seen in 1 report
-
The daemon startup set the process umask to zero, making files and directories world-writable
Seen in 1 report
-
Reference counting for the COM object was not thread-safe, so a worker thread could trigger a second initialisation
Seen in 1 report
-
The code path for the IPv6 packet options socket option lacked proper locking, allowing a race between freeing and using the structure
Seen in 1 report
-
A shared path pointer was replaced with a stack buffer while another thread could still free it, with no locking or ownership check
Seen in 1 report
-
$10,000 High
-
-
The autoscaler used a user-supplied job ID directly in a file path without sanitisation
-
Connection reuse was decided before certificate validation completed, creating a check-then-use gap
Seen in 1 report
-
Negative DNS cache entries were added to a shared cache without proper synchronisation
-
The agent queued responses without ensuring they matched the request that triggered them
Seen in 1 report
-
Timeout handling during allocation left buffers uninitialised
Seen in 1 report
-
UTF-8 decoding read a shared buffer while another thread could modify it
-
Iterator state allowed previously executed writes to be replayed
-
Teardown of a shared handle raced with list destruction, allowing a function pointer hijack
Seen in 1 report
-
A global GSS context was shared across threads without synchronisation
Seen in 1 report
-
The eventfd close path could run twice for the same descriptor
Seen in 1 report
-
The resume logic checked the remote file and then appended without an atomic step
Seen in 1 report
-
Signature verification and file use were separated in time, allowing a swap
-
The lock screen state could be changed between check and use
Seen in 1 report
-
Logout did not invalidate all concurrent sessions for the account
Seen in 1 report
-
Ban and unban actions were not serialised, leaving inconsistent user state
Seen in 1 report
-
Membership changes were not atomic, allowing observation of conversations
Seen in 1 report
-
Recovery steps could be raced to complete a flow for another account
Seen in 1 report
-
The publish endpoint did not check purchase and accepted a publish request during installation
Seen in 1 report
-
Creation checks were not atomic, allowing duplicates or limit overruns
Seen in 1 report
-
The review submission check was not atomic per user
Seen in 1 report
-
Pipelined responses were not matched reliably to their requests
Seen in 1 report
-
Application-level validation was relied on where database constraints were needed
Seen in 1 report
-
A security feature check could be raced against its use
-
Feature entitlement was checked without synchronisation across parallel requests