Open hats-bug-reporter[bot] opened 5 months ago
Upon careful review, we believe the concern about nonce validation is based on a misunderstanding of how nonce management works within the EntryPoint
contract in the account abstraction model. Here are the key points supporting our position:
validateUserOp
function in the BaseAccount
contract already includes nonce validation through the _validateNonce
function, which is managed by the EntryPoint
contract. This ensures that nonce collisions and replay attacks are prevented as part of the standard account abstraction implementation.EntryPoint
contract is responsible for handling the nonce and ensuring that each transaction is unique and cannot be replayed. This functionality is inherent in the design of account abstraction and is already implemented in our system._validateNonce
is critical for preventing replay attacks, we have verified that nonce validation is appropriately handled when transactions are processed through the EntryPoint
.In conclusion, the concern about missing nonce validation is invalid as nonce management is already handled by the EntryPoint
contract in the account abstraction model. The system works as intended, and the PoC provided does not demonstrate a valid vulnerability, and is not even correctly representing our AtomWallet
contract; instead it uses the AtomWalletVulnerable
contract, which is not reflecting the feature set of our original AtomWallet
contract correctly. Therefore, no changes are required and the issue is considered to be invalid.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xf4248046b3d18747563bcd905d0c6d0ab222b0a44e81966ad0980bb8863621d9 Severity: high
Description: Description\ The
AtomWallet
contract inherits from theBaseAccount
abstract contract. TheBaseAccount
contract includes a virtual function,validateUserOp
, which is designed to validate user operations, including signature and nonce validations. However, theAtomWallet
contract does not override the_validateNonce
function. This omission can lead to replay attacks on the protocol.Attack Scenario\
Initial Transaction by User:
AtomWalletVulnerable
contract.nonce_A
) to uniquely identify this transaction.signature_A
) of the transaction data.userOpHash_A
).Capture and Replay Attack:
nonce_A
,signature_A
,userOpHash_A
).nonce_A
,signature_A
,userOpHash_A
) to theAtomWalletVulnerable
contract.Execution of Replay Attack:
AtomWalletVulnerable
contract receives the replayed transaction from Eve.nonce_A
), it considers the replayed transaction as a new and valid operation.Impact on Alice:
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
Files: