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 951 to 1,000 of 2,053
  1. The code cleared the expected origin timestamp before rejecting a packet with a zero origin timestamp, resetting the nonce.

    Seen in 1 report
  2. The code compares the return value of mint and redeem to an error constant, but those functions return the amount minted or redeemed.

    Seen in 1 report
  3. The code did not check that the transfer amount was greater than zero before calling safeTransfer, and some ERC20 tokens revert on zero-value transfers.

    Seen in 1 report
  4. The code did not check whether a string search function returned null before using the result as a pointer.

    Seen in 1 report
  5. The code did not check whether the authorization string was null before using it as a hash table key.

    Seen in 1 report
  6. The code does not check that assets to mint after the relayer fee are above zero, nor that the epoch total value locked is non-zero before the withdraw preview.

    Seen in 1 report
  7. The code does not check that the slope is large enough before subtracting the change.

    Seen in 1 report
  8. The code does not check whether a pointer returned while parsing the URI header is null before using it.

    Seen in 1 report
  9. The code does not check whether the base64 decode returned null before using the result.

    Seen in 1 report
  10. The code does not check whether the number of enabled multisig wallets is zero before dividing by that count.

    Seen in 1 report
  11. The code does not check whether the total weight is zero before dividing, so a zero total weight causes a division-by-zero revert.

    Seen in 1 report
  12. The code does not enforce a maximum size for the access list in typed transactions.

    Seen in 1 report
  13. The code does not handle the broken-pipe signal, so sending to a closed socket terminates the process.

    Seen in 1 report
  14. The code failed to check for a null pointer before using it.

    Seen in 1 report
  15. The code failed to check whether the memory allocation returned null before using the pointer in a copy.

    Seen in 1 report
  16. The code failed to verify the buffer was non-empty after removing the wrapped client key, leading to an assertion failure later.

    Seen in 1 report
  17. The code handling the Content-Type header does not check that a pointer is valid before using it, leading to a null dereference.

    Seen in 1 report
  18. The code indexes into a withdrawal credentials slice without first checking its length.

    Seen in 1 report
  19. The code only searches locked balances to determine the withdrawal epoch and does not first check whether the sum of unlockable tokens and the contract's CVX balance already covers the requested amount.

    Seen in 1 report
  20. The code parses the client's registered redirect URI without checking that the database field exists, and the resulting exception is uncaught.

    Seen in 1 report
  21. The code reads the entire Chart.yaml file into memory without a size limit.

    Seen in 1 report
  22. The code returns early on certain EVM errors without adding consumed gas to the gas meter, and the dispatch path charges no gas upfront.

    Seen in 1 report
  23. The code stores the round count within the current phase instead of the cumulative total across phases.

    Seen in 1 report
  24. The code subtracts a parsed length from the remaining packet length without checking it fits, so the subtraction wraps to a huge value used as a copy size.

    Seen in 1 report
  25. The code subtracts six from RDLENGTH without checking it was at least six, causing an integer underflow and out-of-bounds heap access.

    Seen in 1 report
  26. The code subtracts a constant from a pointer difference without checking it is large enough, producing a huge unsigned length.

    Seen in 1 report
  27. The code subtracts a negative change without checking that the delegatee's current votes cover the decrease.

    Seen in 1 report
  28. The code takes the first value from the client-controlled forwarding header instead of the source IP from the request context.

    Seen in 1 report
  29. The code treats all destroyed statuses alike and unconditionally deletes the account instead of handling destroyed-and-recreated by wiping storage and reinserting.

    Seen in 1 report
  30. The code treats the return value of the formatted print as bytes actually written, but it returns the length that would have been written.

    Seen in 1 report
  31. The code unconditionally adds the event name to the filtered set even when filter parsing failed, and cleanup skips removal because the matcher ID is -1.

    Seen in 1 report
  32. The code unconditionally calls the plugin withdrawal even when the amount or plugin balance is zero, without checking if a withdrawal was needed.

    Seen in 1 report
  33. The code updates lien.last to the current timestamp even for expired liens, causing a subtraction underflow when calculating the slope because end minus lien.last becomes negative.

    Seen in 1 report
  34. The code uses an uninitialised buffer index (initialised to 0xffff) to access packet data when an IP header error triggers an ICMP error message before the index is properly set.

    Seen in 1 report
  35. The code uses the bath token balance as a condition to call the max borrow function, which requires positive liquidity a new position does not have.

    Seen in 1 report
  36. The collateral factor doubles as an acceptance flag, so zero causes division by zero.

    Seen in 1 report
  37. The collateral token array has no cap and no removal mechanism, so functions that iterate over it grow in gas cost.

    Seen in 1 report
  38. The combined value field is not range checked before arithmetic, so a large value overflows and aborts the whole batch.

    Seen in 1 report
  39. The command returns early without unlocking a global semaphore when the request lacks a parameter, causing a deadlock.

    Seen in 1 report
  40. The commit function does not handle reverts from individual market update calls.

    Seen in 1 report
  41. The compiler only rejects redo when there is no enclosing loop, so a redo inside a rescue body generates a backward jump to the handler's own error instruction.

    Seen in 1 report
  42. The compiler unwraps the memory location of constant Bytes and String variables during code generation, losing the location needed later.

    Seen in 1 report
  43. The complexity multiplier returns zero whenever an iid or iids argument is present.

    Seen in 1 report
  44. The compression offset check only prevents double indirection, not self-reference, so the name recurses infinitely.

    Seen in 1 report
  45. The configuration function does not properly validate or restrict access to the protobuffer message, allowing any device on the local network to change critical network settings.

    Seen in 1 report
  46. The confirm-change function iterates over all pending staking changes without a cap.

    Seen in 1 report
  47. The confirmation function accepts an empty list and is callable by anyone, so an attacker can set the pending time to its maximum.

    Seen in 1 report
  48. The connection gater adds entries on every dial attempt but the error and success paths do not remove all of them.

    Seen in 1 report
  49. The connection path size is not validated to be non-zero, leading to a call through a null function pointer.

    Seen in 1 report
  50. The constructor never increases the pool's observation cardinality, leaving the default of one, which is too low for a 30-minute TWAP.

    Seen in 1 report