-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SmartAccount's validateUserOp function should return SIG_VALIDATION_FAILED rather than revert if the signature is invalid #318
Comments
gzeon-c4 marked the issue as primary issue |
not high risk |
you're right. it has to be rebased with the latest code (0.4.0). |
livingrockrises marked the issue as sponsor confirmed |
livingrockrises marked the issue as disagree with severity |
gzeon-c4 changed the severity to 2 (Med Risk) |
gzeon-c4 marked the issue as selected for report |
Hey @gzeon-c4 @livingrockrises! The #498 describes that
At the same time, the nature of these reports is very similar, so it does not give impact examples, but claim to be incompatible with the standard. All in all, I think this report and its duplicates should be evaluated as duplicates of #498, and not a separate issue. |
yes it merely talks about contracts should be upgraded as entry point upgrades. when we scoped for C4 ERC4337 was at v0.3.0 now they are at 0.4.0 plus new commits that will become 0.5.0 with these interface updates. we have been already rebasing our wallet source with latest versions. just that it couldn't be sent for c4 audit scope end of year |
@gzeoneth Could you please take a look at my message above? |
make sense |
gzeon-c4 marked the issue as duplicate of #498 |
gzeon-c4 marked the issue as not selected for report |
gzeon-c4 marked the issue as satisfactory |
Lines of code
https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L506-L513
https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/BaseSmartAccount.sol#L63
Vulnerability details
Impact
According to the Biconomy's docs (check contest overview),
As per Biconomy, it doesn't support signature aggregation at the moment, and according to Account Abstraction specs EIP-4337
However, the SmartAccount reverts rather than returns SIG_VALIDATION_FAILED. This migh lead to incompatibility since any EntryPoint that would be used in future will expect a returned value in case of invalid signature instead of a revert.
Proof of Concept
validateUserOp
function (in BaseSmartAccount) calls_validateSignature
to validate the userOp (UserOperation). However,_validateSignature
reverts if the signature is invalid rather than returning SIG_VALIDATION_FAILED.Check SmartAccount contract for
Tools Used
Manual analysis
Recommended Mitigation Steps
If the signature is invalid return SIG_VALIDATION_FAILED. for any other error, revert.
Note: adjust the EntryPoint contract according to the suggested change above.
The text was updated successfully, but these errors were encountered: