Skip to content
DoS Audit finding Intermediate

Use of .send() May Revert if The Recipient’s Fallback Function Consumes More Than 2300 Gas

The contract uses .send() to transfer ETH, which forwards a fixed 2300 gas. If the recipient's fallback function requires more gas, the transfer reverts, potentially blocking sensitive functions for the vault and owner.

leastwood Follow

Originally disclosed on Code4rena

Submitted by leastwood, also found by 0xliumin, berndartmueller, cccz, Czar102, gzeon, hickuphh3, horsefacts, ilan, IllIllI, joestakey, m9800, p4st13r4, peritoflores, reassor, rfa, robee, sorrynotsorry, tintin, TrungOre, VAD37, WatchPug, and z3s

ForgottenRunesWarriorsMinter.sol#L610 ForgottenRunesWarriorsMinter.sol#L618 ForgottenRunesWarriorsGuild.sol#L164

The .send() function intends to transfer an ETH amount with a fixed amount of 2300 gas. This function is not equipped to handle changes in the underlying .send() and .transfer() functions which may supply different amounts of gas in the future. Additionally, if the recipient implements a fallback function containing some sort of logic, this may inevitably revert, meaning the vault and owner of the contract will never be able to call certain sensitive functions.

Recommended Mitigation Steps

Consider using .call() instead with the checks-effects-interactions pattern implemented correctly. Careful consideration needs to be made to prevent reentrancy.

gzeon (judge) commented:

Determined the stake is high here and therefore Medium Risk.


The original report as published on Code4rena, by leastwood. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the use of .send() with its hardcoded 2300 gas stipend, which is insufficient for recipients with logic in their fallback function.

Impact

Sensitive functions could become uncallable if a recipient's fallback consumes more than 2300 gas, potentially locking funds or preventing owner actions.

What the attacker needed

Recipient is a contract with a gas-heavy fallback

The fix

Use .call() with the checks-effects-interactions pattern and careful reentrancy protection instead of .send().

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a smart contract sends Ether to another contract, it can specify how much processing power (gas) the recipient gets to handle the payment. This code gives only a small fixed amount, so if the recipient needs to do anything extra, the payment fails and the whole transaction is undone. That could lock the owner out of important actions.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by leastwood

View all

70 more disclosed reports, best first.

More from Forgotten Runes Warrior Guild contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.