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.
-
The fragment length field is used unchecked to size the fragment buffer, so zero means no input is consumed.
Seen in 1 report
-
The frame handler reads the call frame pointer without a null check even though it is null at the top level.
-
The frame parser does not validate that the declared padding length fits within the received payload.
-
The full collateral is moved to cover an earmark before the liquidator fee is paid, with no check that enough remains.
Seen in 1 report
-
The full name input has no maximum length unlike the email and username fields.
-
The full untrusted contact array is deduplicated with a search inside a filter pass before the item cap is applied, making the work quadratic.
-
The function computes total borrowed credit as a subtraction of two values that can cross due to changes in creditMultiplier, without guarding against underflow.
Seen in 1 report
-
The function does not check that its input is a string and relies on implicit type coercion.
Seen in 1 report
-
The function does not verify the sender, so anyone can submit a copied bundle and the nonce mechanism makes the original fail.
Seen in 1 report
-
The function hard reverts when an account is not liquidatable instead of skipping it and continuing.
Seen in 1 report
-
The function iterates over an unbounded array of pools without limiting the number of iterations, so the gas cost can exceed the block gas limit.
Seen in 1 report
-
The function processes an unbounded array without limiting the number of iterations, leading to excessive gas consumption.
-
The function relies on the difference between pre- and post-claim balances, which anyone could inflate beforehand.
Seen in 1 report
-
The function requires the treasury's token balance to be exactly zero after redemption, but an attacker could increase that balance by sending tokens directly, breaking the invariant.
Seen in 1 report
-
The function returns allocated memory without documenting or enforcing that the caller must free it and does not check allocation failure.
Seen in 1 report
-
The function sets total weight to zero before reallocating assets, which divides by that weight.
Seen in 1 report
-
The function subtracts sponsored from underlying without checking for underflow.
Seen in 1 report
-
The function trusts the length property of its first argument without verifying it is a genuine array.
Seen in 1 report
-
The function uses a single conditional block instead of a loop, so it stops after deleting the first matching entry.
Seen in 1 report
-
The functions iterate over an unbounded list of orders or token IDs while doing costly work and external calls inside the loop, so gas use grows with the list size.
Seen in 1 report
-
The gas check does not account for the EVM's 63/64 gas forwarding rule.
-
The gas check does not include the gas cost of the subsequent SSTORE operation.
Seen in 1 report
-
The gas estimate only counts message length linearly and ignores the quadratic memory expansion cost of hashing on L1.
-
The gas limit calculation uses a flat 16 gas per data byte instead of accounting for the lower cost of zero bytes.
-
The gas meter is reset on every gas price voter message instead of accumulating gas across all messages in a transaction.
-
The gas reservation logic only checks a fixed reserve and does not ensure the subsequent call receives a minimum amount of gas.
-
The gas throttle relies on an external oracle with no governance mechanism to disable it.
Seen in 1 report
-
The gateway handler passes the request's signed proposal into a helper without checking that the proposal or its payload is present, so a nil value is dereferenced.
Seen in 1 report
-
The generated protobuf unmarshalling code did not check whether adding the skip length to the current index could cause an integer overflow.
Seen in 1 report
-
The geometry parsers recursed per nested child with no depth limit and no stack-overrun check.
-
The GetBlockHeaders handler does not limit the size of the requested block range.
Seen in 1 report
-
The GetReceiptsMsg handler has no rate limiting or resource cap, so a peer can force expensive receipt lookups repeatedly.
-
The GIF decoder does not validate or bound frame dimensions and timing values, so crafted frames cause unbounded memory allocation.
-
The gossip handler has no size limit, no signature verification and only de-duplicates on a freely chosen public key.
Seen in 1 report
-
The graduation path relies on a router function that requires both pair reserves to be greater than zero.
Seen in 1 report
-
The GraphQL server did not cap or deduplicate repeated aliases of an expensive mutation, so each alias triggered the full backend work.
-
The GraphQL server did not enforce a maximum query depth, so deeply nested introspection consumed excessive resources.
-
The groups module did not validate or limit the exponent range of member weights, causing a decimal division error that was not handled.
Seen in 1 report
-
The gRPC server's default maximum request size is not raised or handled, so large batch writes fail before processing.
-
The GuildToken contract stores a single profitManager address in its constructor instead of looking up the correct ProfitManager for each gauge dynamically.
-
The gzip stream class reads the whole decompressed content into memory with no size limit.
Seen in 1 report
-
The handler allocates a fresh response object per informational status and chains them with no depth cap, skipping the header-size accounting used elsewhere.
-
The handler did not cap the array entries or deduplicate repeated amounts before building a distribution for each.
Seen in 1 report
-
The handler does not check that the account ID field is an array, so an object with a length above the safe integer limit is used in a loop condition.
Seen in 1 report
-
The handler does not limit how many account IDs it processes and holds a lock also used by transaction processing.
Seen in 1 report
-
The handler does not validate the start slot and count fields of incoming requests.
Seen in 1 report
-
The handler does not verify that a user-supplied field is an array before using its length property in a loop.
Seen in 1 report
-
The handler never checks the length of the caller-supplied storage-key list before walking a proof for each key.
-
The handler uses required parameters without checking they are present, so a missing parameter causes an unhandled error that kills the process.
Seen in 1 report
-
Critical
-
-
The handler validated a minimum buffer size but then read a field at a larger offset.