Closed leekt closed 1 year ago
The check is indeed required. Can you add a PR for that?
(it would be best of Eip4337Manager was not a full "Safe". however, since it uses a lot of safe members (threshold, nonce, modules), it is tricky to implement it without being a Safe, and without a lot of copy-and-paste from the Safe code..)
Sure :) i'll start working on the fixes
PoC : https://github.com/leekt/account-abstraction/commit/c21e13fc5f0b3bcaa9b87ab726916b6ec9c4bb8e
EIP4337Manager implementation contract can be destructed with delegatecall although it's
setup()
function cannot be called directly since it is blocked with simple threshold = 1, anyone can callsetup4337Modules()
without any authorization to enable delegatecall from malicious actorSince EIP4337Manager is not a direct implementation contract for proxy, funds are not at risk.
But, this will lead to DoS for ERC4337 features which will potentially damage the business logic of wallet provider
remediation: add simple blocker for calling function directly to implementation contract for
setup4337Modules
andreplaceEIP4337Manager