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.
-
Use a non-reverting signature recovery alternative.
-
Decouple slashing from yield claims that can revert.
Seen in 1 report
-
Skip validators whose keys are already active instead of reverting.
Seen in 1 report
-
Handle failed token transfers in queue processing so one blocked address cannot freeze the queue.
Seen in 1 report
-
Remove array entries instead of zeroing them.
Seen in 1 report
-
Complete cancellation before performing external token transfers.
Seen in 1 report
-
Skip the price check when closing a loan with no remaining debt.
-
Allow the waiting flag to be cleared or the provider to be replaced when the provider does not respond.
Seen in 1 report
-
Cap user-supplied gas limits to a realistic maximum for the destination chain.
-
Use safe token transfer helpers that handle tokens without boolean returns.
Seen in 1 report
-
Allow alternative operators to execute jobs when the gas price exceeds the user's limit.
-
Wrap oracle calls in try or catch with a fallback.
Seen in 1 report
-
Track burned reserve tokens so the mintable count cannot underflow.
-
Use a bounded or logarithmic search instead of scanning all tiers.
Seen in 1 report
-
Remove the unnecessary price call from epoch ending.
Seen in 1 report
-
The logic issue was addressed with improved checks.
-
Validate that required parameters are present, not just that their values are valid when supplied.
Seen in 1 report
-
Only trust forwarding headers from known load balancers and key rate limits on the verified peer address.
Seen in 1 report
-
Wrap the SNI callback in a try/catch so exceptions cannot escape as uncaught crashes.
-
Remove peerstore entries on disconnect and enable the cleanup routine by default.
Seen in 1 report
-
Record seen hashes before signature verification so invalid messages still count against the flood limiter.
Seen in 1 report
-
Mount admin methods only when explicitly enabled and reject mixed-zero base-fee fields.
Seen in 1 report
-
Bounds-check sizes taken from the Vorbis setup header before calling stack allocation.
Seen in 1 report
-
Add a release-build check on packed key sizes so truncation cannot underflow a length.
Seen in 1 report
-
Cap buffered messages per block height and verify signatures before buffering.
Seen in 1 report
-
Perform authorisation checks before any state mutation and avoid double nonce increments on failure.
Seen in 1 report
-
Cap or deduplicate repeated aliases of expensive mutations in a single request.
-
Verify the buffer is non-empty after removing the wrapped client key before proceeding.
Seen in 1 report
-
Add a depth limit to recursive language context switching in the highlighter.
Seen in 1 report
-
Decrement the backlog counter only when data is actually flushed to a channel.
Seen in 1 report
-
Inspect the inner transaction list rather than the Option wrapper and check all transactions, not just the first.
-
Cap the decompressed output size when reading Brotli input.
-
Require authentication on provider classes that expose functionality.
Seen in 1 report
-
Guard buffer allocation arithmetic against integer overflow during request handling.
Seen in 1 report
-
Add a classifier case for the expired-origin error so stale proofs are dropped rather than retried.
-
Wire the connection-limits behaviour into the swarm and enforce the configured peer limits rather than only reporting them as metrics.
Seen in 1 report
-
Enforce a maximum nesting depth in the recursive MIME read helpers.
Seen in 1 report
-
Check that the decoded path is non-empty before indexing or slicing it.
-
Set message and frame size limits on the upgrade and avoid buffering inbound frames the proxy does not use.
Seen in 1 report
-
Enforce a maximum accumulated size on the install stream buffer.
Seen in 1 report
-
Create socket files in a private directory with unpredictable names.
Seen in 1 report
-
Validate deserialised page dimensions for upper bounds, infinity and NaN.
Seen in 1 report
-
Bind uploaded guardian shares to the current recovery session so stale shares cannot overwrite fresh ones.
Seen in 1 report
-
Add a codec-aware check on realistic compression ratios before trusting metadata-derived buffer sizes.
-
Do not use a peer's advertised height for sync-state decisions until headers and cumulative work have been validated.
-
Do not size or fill a read buffer to the declared frame length before the frame body arrives.
-
Validate the amount against a bounded numeric range and reject exponent notation before parsing on the UI thread.
-
Await the subscription sink's closed future so unsubscribing or disconnecting terminates the task.
Seen in 1 report
-
Do not export debug navigation deep links in production builds.
Seen in 1 report
-
Bound the number of failed proof verifications per block and charge weight for failed attempts.