40,000 USDC
View results
Submission Details
Severity: high

No zero address check can result in DOS (Fund Stuck) in Escrow contract

Summary

No zero address check for arbiter address in Escrow contract is present. So, if someone set the arbiter address to zero and then buyer/seller call to initiateDispute then s_state become to State.Disputed and to resolve the dispute resolveDispute need to be called by arbiter only. As, the arbiter address is zero address then not possible to resolve the dispute ever and the fund will be stuck forever.

Vulnerability Details

  1. Buyer calls newEscrow function of EscrowFactory.sol with necessary input and provides arbiter address to zero address. A new Escrow contract will be created with arbiter address as zero.

  2. Now Buyer/Seller calls the initiateDispute function of Escrow.sol contract. Now the s_state became to State.Disputed

  3. Now to resolve the dispute resolveDispute need to be called by arbiter only. But it's never possible as arbiter address is zero address.

  4. The funds available in the Escrow contract will be stuck forever.

Impact

The funds available in the Escrow contract will be stuck forever.

Recommendations

Don't allow to set arbiter address to zero address.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.