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 shader translator does not handle malformed input gracefully and throws when compilation fails.
Seen in 1 report
-
The shader translator hit an assertion when that instruction targeted an output register instead of handling it gracefully.
Seen in 1 report
-
The share calculation checked total assets for zero but not total supply.
Seen in 1 report
-
Medium
-
-
The share gathering function does not check that each claimed key ID belongs to the submitting signer, unlike the nonce gathering function.
-
The share price calculation uses the contract's token balance as totalAssets, which can be inflated by direct transfers, causing new deposits to round down to zero shares and fail the minimum share check.
-
The share price growth check runs after a state change that does not immediately move the share price.
-
The shareinfo endpoint lacked brute-force protection and rate limiting and did not restrict which share types it accepted.
Seen in 1 report
-
The sign-in endpoint accepted email and password input with no maximum length check.
Seen in 1 report
-
The signature-based allowance function did not check that the caller was an approved collateralizable contract.
Seen in 1 report
-
The signer returned an error on invalid payloads and retried indefinitely without advancing the nonce.
Seen in 1 report
-
The signer sets its wallet nonce to whatever value a sign request asks for without validating it.
-
The signing round requires a share from every nonce provider, so one provider can stall it.
-
The single-transaction insert lacks the duplicate check that the batch insert has.
Seen in 1 report
-
The SIP parser accepted non-SIP URIs as valid, leading to a NULL scheme pointer that was dereferenced without checking.
Seen in 1 report
-
The size limit was enforced on the compressed input before decompression, so the inflated output was never bounded.
Seen in 1 report
-
The size of source files parsed and rendered on the client is not limited, so large files consume excessive client CPU.
Seen in 1 report
-
The SNI callback was invoked without a try/catch, so a synchronous exception escaped the TLS error handling.
-
The sort algorithm's gas cost grows with the number of stakers and the maximum allowed count may still be too many.
Seen in 1 report
-
The spawned task never awaits the subscription sink's closed future, so cancellation does not terminate it.
Seen in 1 report
-
The spec allows longer varints than one client's decoder accepts, so non-minimal encodings are rejected.
-
The specification adds a fixed offset to a very large base length in a fixed-size integer type, causing an overflow exception.
Seen in 1 report
-
The specification does not define standard rate-limit parameters, scopes or error codes, so each client implements its own.
Seen in 1 report
-
The specification does not require the state parameter to be unique or single-use.
-
The SPIR-V writer did not deduplicate non-aggregate type declarations, producing invalid output that crashed.
Seen in 1 report
-
The SPIR-V writer does not validate that a function type stays within the argument limit.
Seen in 1 report
-
The split-off cutoff is off by one, so the slot that should be kept is also removed.
-
The SQL query uses a single placeholder for an IN clause while the code passes an array of IDs.
Seen in 1 report
-
The square root function used a Yul stop instruction for zero input, halting execution entirely.
-
The stake function did not handle a zero stake amount and the underlying staking contract reverts on zero value.
Seen in 1 report
-
The stake function did not restrict deposits to other addresses when a warm-up period was active, allowing an attacker to overwrite the recipient's warm-up expiry with a minimal deposit.
Seen in 1 report
-
The stake function does not initialise the last-claimed epoch for new users.
Seen in 1 report
-
The staking parser converts the whole transaction data field to a string without a maximum length.
Seen in 1 report
-
The stale oracle check runs before the operation type is determined, blocking all dispatch operations.
-
The staleness check subtracts the oracle timestamp from block.timestamp without first confirming the oracle timestamp is not in the future, so an unsigned subtraction underflows and reverts.
-
The start height is not validated against the latest height and no maximum range is enforced.
Seen in 1 report
-
The state API loads the whole file into memory instead of streaming it.
Seen in 1 report
-
The stop function checked the current hook status while the hook address was fixed at rental creation.
Seen in 1 report
-
The strategy approves only the intended amount while the router pulls the caller's entire token balance.
-
The strategy does not verify that the amount passed to deposit or withdraw is non-zero after converting decimals.
-
The stream sender ignores the write return value that signals a full buffer and keeps reading.
-
The string hash function used the numeric value of integer-like strings directly, so many distinct strings produced the same hash.
Seen in 1 report
-
Medium
-
-
The stringify function passes attacker-controlled data to a buffer constructor without validating the length property.
Seen in 1 report
-
The submit failure path requeued the same proof without a bounded retry counter or a check that the cached parent was still valid.
-
The submit path checked status and prover fields but not the challenged index, so a pending nullify built from pre-challenge state was never rebuilt.
-
The subscription map has no upper bound, so each new subscription permanently consumes memory.
Seen in 1 report
-
The substitution class does not limit recursion depth when evaluating user-supplied patterns.
Seen in 1 report
-
The subtraction of claimed steps from the current step underflows when rounding makes claimed steps exceed the current step.
Seen in 1 report
-
The subtraction of slashed assets did not account for rounding, so the converted owner balance could exceed the node's total restaked amount.
Seen in 1 report
-
The subtraction of two uint32 timestamps is not wrapped in an unchecked block, so it reverts on underflow when the current timestamp has overflowed but the previous one has not.
Seen in 1 report
-
The subtraction order is reversed, subtracting the total balance from the borrowed amount.