Calling execute() and executeBatch() functions in SmartAccount.sol from the EntryPoint will fail #495
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-390
satisfactory
satisfies C4 submission criteria; eligible for awards
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L460
https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/SmartAccount.sol#L465
Vulnerability details
Impact
The function
_requireFromEntryPointOrOwner()
is being called within theexecute()
andexecuteBatch()
functions to check if themsg.sender
is either the owner or theEntryPoint
contract, but these functions haveonlyOwner()
modifier, which will only allow the owner to execute these functions.Proof of Concept
Calling these functions from the
EntryPoint
contract will failTools Used
VSCode
Recommended Mitigation Steps
Remove
onlyOwner
modifier from both functionsThe text was updated successfully, but these errors were encountered: