Structural Error
In this page, we explore vulnerabilities caused by incorrect structural error.
Version Mismatch of Reference Implementation
There are cases where the Paymaster implements the v0.6 interface but references an EntryPoint from v0.7.
In the eth-infinitism project, when the account-abstraction was upgraded from version 0.6 to 0.7, there were some changes.
The code above shows where validatePaymasterUserOp
is called to validate the paymaster for a UserOp in Entrypoint versions 0.6 and 0.7.
Looking at the parameters in each code snippet shows that the parameter on line 6 is different. Version 0.6 uses the UserOperation struct, while version 0.7 uses the PackedUserOperation struct.
The code above shows the UserOperation struct used in account-abstraction version 0.6 and the PackedUserOperation struct used in version 0.7. Although there are only small structural changes between them, using the wrong struct type as a parameter can lead to a revert.
Mitigation: Implement the paymaster according to version 0.7, or reference Entrypoint version 0.6 to maintain version consistency.
Improper Handling of Invalid paymasterAndData Format During Validation
If a UserOp with an improperly formatted UserOperation.paymasterAndData
is submitted and the paymaster's validation function fails to correctly identify and revert the invalid format, it could lead to unexpected results.
Mitigation : During the validation process, parse paymasterAndData and revert if the format is incorrect
Last updated