Skip to content

In-depth lesson · DoS

Typical fixes

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

Back to the lesson 151 to 200 of 254
  1. Handle the case where total assets are zero while supply is non-zero, for example by burning shares on payout.

    Seen in 1 report
  2. Return the actual weight used so unexecuted segments are refunded.

    Seen in 1 report
  3. Require the guardian's consent before enrolling it and provide a way to release consumed slots.

    Seen in 1 report
  4. Recycle reserve IDs when a reserve is dropped or track live reserves rather than cumulative creations.

    Seen in 1 report
  5. Do not enable the recipient's collateral bit automatically without consent or a maximum reserve check.

    Seen in 1 report
  6. Paginate or bound per-user liquidation history instead of rewriting one growing vector.

    Seen in 1 report
  7. Enforce the maximum list size on add and preserve the invariant on remove.

    Seen in 1 report
  8. Cap the seizure amount to the available collateral before subtracting.

    Seen in 1 report
  9. Saturate the health factor to the maximum value instead of panicking on overflow.

    Seen in 1 report
  10. Make the transfer validation path behave consistently when called from the aToken transfer context.

    Seen in 1 report
  11. Account for the aggregate reward work a single liquidation can trigger when capping reward tokens.

    Seen in 1 report
  12. Cover API paths with the access policy and add effective rate limiting at the origin.

    Seen in 1 report
  13. Allowlist the methods the light-client protocol may forward and bound derivation template length and junction count.

    Seen in 1 report
  14. Block the state-building method under the safe RPC policy.

    Seen in 1 report
  15. Keep the pool size below the per-peer gossip cache capacity or handle cache misses without overflowing the notification queue.

    Seen in 1 report
  16. Re-validate required fields on the server and handle processing exceptions safely.

    Seen in 1 report
  17. Range-check the expiry before converting it to a date and treat an invalid date as absent.

    Seen in 1 report
  18. Reserve or charge the advertised tip before using it for priority.

    Seen in 1 report
  19. Bounds-check the size before narrowing it to a signed integer.

    Seen in 1 report
  20. Apply the variable size check to compute shader stages as well.

    Seen in 1 report
  21. Confirm the loop variable is scalar before treating the loop as finite.

    Seen in 1 report
  22. Hold a reference or re-check the window after synchronous observer notifications.

    Seen in 1 report
  23. Validate dense recurrence rules on every import path and bound the number of occurrences generated.

    Seen in 1 report
  24. Count retained header blocks against the session memory limit.

    Seen in 1 report
  25. Bound the number of address records processed by resolve-any.

    Seen in 1 report
  26. Validate the typed array's byte length against the real buffer before use.

    Seen in 1 report
  27. Add a correct termination condition to the NSEC type bitmap loop.

    Seen in 1 report
  28. Chunk notification inserts and cap how many favouriters a single item can fan out to.

    Seen in 1 report
  29. Check declared lengths against the remaining stream size and a maximum before allocating.

    Seen in 1 report
  30. Apply request read timeouts to QUIC streams rather than only to TCP deadlines.

    Seen in 1 report
  31. Enable memoisation or rewrite the grammar to avoid exponential backtracking and avoid holding a global lock during parsing.

    Seen in 1 report
  32. Key the rate limiter on the requesting account as well as the address.

    Seen in 1 report
  33. Verify the MAC before adding to the replay cache and give the cache an expiry.

    Seen in 1 report
  34. Cap the width value before allocating the output buffer.

    Seen in 1 report
  35. Validate the client field count against the index limit before allocating stack memory.

    Seen in 1 report
  36. Give the file owner an override on every lock type and tie locks to the locker's account lifecycle.

    Seen in 1 report
  37. Validate and length-limit the emoji field and strip newlines.

    Seen in 1 report
  38. Cap aliases per request and add query cost analysis and operation-level rate limiting.

    Seen in 1 report
  39. Add a replay guard to the network access IPC and detach request pointers when jobs are destroyed.

    Seen in 1 report
  40. Use consistent size limits between parsing and reloading the cookie jar.

    Seen in 1 report
  41. Do not discard pending transfers whose timers have expired when they are outside the process set.

    Seen in 1 report
  42. Limit directory recursion depth and catch recursion errors.

    Seen in 1 report
  43. Apply the same size limit to the encoding detection path as to other sniffing paths.

    Seen in 1 report
  44. Disable external entity resolution and limit entity expansion in the SVG parser.

    Seen in 1 report
  45. Rewrite the email regex to avoid nested or overlapping quantifiers.

    Seen in 1 report
  46. Enforce server-side rate limits and usage quotas on the chat endpoint.

    Seen in 1 report
  47. Remove the automatic request loop from the reset page and require user action.

    Seen in 1 report
  48. Reject scientific-notation strings before passing them to a big-decimal parser.

    Seen in 1 report
  49. Handle rendering errors around collapsed message groups and their banner gracefully.

    Seen in 1 report
  50. Use separate status variables for each allocation so a later success cannot mask an earlier failure.

    Seen in 1 report