Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Invalid transactions should revert

Summary

According to the zkSYnc documentations if the transaction is invalid it should revert in the `validateTransactin` step. However the wallet is just returning invalid hash.

  1. Transaction Validation: The validateTransaction method on the account is invoked. If this method executes successfully without reverting, the process moves to the next step.

https://docs.zksync.io/build/developer-reference/account-abstraction/design#steps-in-the-validation-process

https://github.com/Cyfrin/2024-07-Mondrian-Wallet_v2/blob/7bc5f7367217eb75e89a002868453e627d6fef4e/src/MondrianWallet2.sol#L146

Impact

An attacker can trick the user by exploiting the fact that the wallet does not revert on invalid transactions, leading to potential misuse or exploitation.

Tools Used

Manual review

Recommendations

Revert instead of returning 0 from the validateTransaction if the returned magic is bytes4(0)then revert.

Updates

Lead Judging Commences

bube Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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