Skip to content

In-depth lesson · DoS

Root causes

Every point the DoS reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1,651 to 1,700 of 2,053
  1. The removal handlers do not validate that the amount is non-negative, and coin creation panics on negative amounts.

    Seen in 1 report
  2. The removal loop decremented the list length before comparing it with the loop counter, so with several closed sockets not all were removed and one with a negative descriptor stayed in the list.

    Seen in 1 report
  3. The removal swaps the last feeder into the removed slot and pops the array but does not update the position map for the moved feeder.

    Seen in 1 report
  4. The removeAddress function used delete instead of properly removing an array element, leaving a zero address in the array.

    Seen in 1 report
  5. The removePlugin function requires the plugin to report itself as deactivated, which a malicious plugin can refuse to do.

    Seen in 1 report
  6. The renderer does not limit diagram complexity, so repeated nodes and long labels cause excessive computation.

    Seen in 1 report
  7. The rendering logic did not guard against an object referencing itself.

    Seen in 1 report
  8. The repay function decreased total debt without guarding against underflow and allowed repaying more than a borrower owed.

    Seen in 1 report
  9. The repay function subtracted the full amount from the debt without checking for underflow.

    Seen in 1 report
  10. The report view fetched and rendered all comments in one request without pagination or size limits.

    Seen in 1 report
  11. The request decider does not handle multiple withdrawal requests from one transaction, causing a database foreign key violation.

    Seen in 1 report
  12. The request handler copied the URI into a fixed-size buffer without checking its length.

    Seen in 1 report
  13. The request handler read a cookie value with a line-reading call without bounds or termination handling, blocking indefinitely.

    Seen in 1 report
  14. The request-handling code used a hash table with a predictable hash function and no protection against many keys colliding in the same bucket.

    Seen in 1 report
  15. The required amount is derived from a balance anyone can increase.

    Seen in 1 report
  16. The requirement compares the full proposal bid to the remaining pool amount instead of the current milestone amount.

    Seen in 1 report
  17. The reserve ID counter is never decremented or recycled when a reserve is dropped.

    Seen in 1 report
  18. The reserve update calls the external pool without a try-catch, so any revert blocks all minting and redemption.

    Seen in 1 report
  19. The reserves lookup does not check whether the category's submodule reserves selector is empty before calling it on each submodule.

    Seen in 1 report
  20. The reset check compared equality against the list length instead of greater-or-equal, so a stale index was never reset.

    Seen in 1 report
  21. The reset password form and its back-end lacked any maximum length validation on the new password field.

    Seen in 1 report
  22. The resolution function required the caller-supplied task count to equal the current task count, so any task added during the dispute window made resolution revert.

    Seen in 1 report
  23. The resolve-any path aborts the process when a response carries more than 256 address records.

    Seen in 1 report
  24. The resolver processes array inputs synchronously without array size limits or query cost analysis.

    Seen in 1 report
  25. The response object does not listen for the socket close event, so it never completes when the socket is destroyed.

    Seen in 1 report
  26. The response parser dereferences the result of a string lookup without a null check.

    Seen in 1 report
  27. The response parser expanded UID-set ranges into arrays without limiting the expanded size.

    Seen in 1 report
  28. The response size limit is enforced only after full serialisation and large batches are allowed by default.

    Seen in 1 report
  29. The restrict list functions did not check whether the packet helper returned null when the sequence number reached its maximum.

    Seen in 1 report
  30. The restrict list was traversed recursively instead of iteratively.

    Seen in 1 report
  31. The resubscribe goroutine exits when the inner subscription ends, so a later unsubscribe write to the unblock channel blocks forever.

    Seen in 1 report
  32. The retrieval function lacked limits on the number of digests and had no timeouts.

    Seen in 1 report
  33. The retrieve function passed the proxy target address instead of the actual Sablier lockup stream address as the lockup parameter to withdrawMax.

    Seen in 1 report
  34. The retry helper treats every failed transaction as transient, so a permanent revert never sets the completion flag.

    Seen in 1 report
  35. The retry-after value is parsed and passed to a sleep call without an upper bound.

    Seen in 1 report
  36. The return value of the header parser was not checked, leaving stale values from a previous message in use.

    Seen in 1 report
  37. The return value of the thread attribute call is not checked before destroying the attribute.

    Seen in 1 report
  38. The return value of the user buffer copy was checked with a test that treated the zero-length error pointer as valid.

    Seen in 1 report
  39. The revert-message helper decodes attacker-controlled bytes without checking the declared string length against the actual data bounds.

    Seen in 1 report
  40. The revert-message parser decodes attacker-controlled bytes without validating offset and length fields, so malformed encoding makes the decode revert.

    Seen in 1 report
  41. The reward calculation divides by the reward tracker's total supply without checking for zero.

    Seen in 1 report
  42. The reward calculation does not cap the user's reward at the remaining unclaimed incentive amount, so the subtraction underflows.

    Seen in 1 report
  43. The reward calculation does not handle a zero debt to offset, causing an underflow when subtracting a stored loss error from zero.

    Seen in 1 report
  44. The reward calculation uses the landlord's last update time instead of the user's last toil time, causing an underflow when the plot is invalidated.

    Seen in 1 report
  45. The reward deposit reverts when the deposited token is not the reward token and total shares is zero.

    Seen in 1 report
  46. The reward distribution uses a push model, transferring tokens during every balance update, so a failing token transfer reverts the entire transaction including liquidation.

    Seen in 1 report
  47. The reward pool bundled all reward tokens into a single claim loop, so if any one reward token had pausable transfers and was paused, the entire claim or withdrawal reverted.

    Seen in 1 report
  48. The reward token list was unbounded and could not be shortened, so iterating over it in the updateReward modifier could exceed the block gas limit.

    Seen in 1 report
  49. The reward transfer function did not cap the reward amount by the contract's current token balance, so a full withdrawal left it unable to pay and caused a revert.

    Seen in 1 report
  50. The ring buffer code loops forever when the buffer is full, causing a watchdog reset.

    Seen in 1 report