You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signers can frontrun Safe.exectransaction() when using delegatecalls to make it Revert.
Summary
Malicious Signers and hat wearers can use removeSigner() , claimSigner() to grief Safe.exectransaction() when using delegatecalls.
Root Cause
Safe's Safe.execTransaction() calls function HSG::checkAfterExecution() which is used to check If the transaction did not maliciously affect the safe, However in case of delegatecall transactions HSG::checkAfterExecution() calls HSG::_checkSafeState() which has an inbuilt check for change in number of owners:-
if (keccak256(abi.encode(_safe.getOwners())) != _existingOwnersHash) revert CannotChangeOwners();
Wait for Safe.execTransaction() using a delegatecall to appear in TxPool
Frontrun Tx by using removeSigner() or claimSigner().
_checkSafeState() would fail and Tx would revert.
Impact
Griefing of Users, Bad UX.
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered:
sherlock-admin2
changed the title
Joyful Gingham Tarantula - Signers can frontrun Safe.exectransaction() when using delegatecalls to make it Revert.
0x3adeade - Signers can frontrun Safe.exectransaction() when using delegatecalls to make it Revert.
Nov 27, 2024
0x3adeade
Medium
Signers can frontrun
Safe.exectransaction()
when using delegatecalls to make it Revert.Summary
Malicious Signers and hat wearers can use
removeSigner()
,claimSigner()
to griefSafe.exectransaction()
when using delegatecalls.Root Cause
Safe's
Safe.execTransaction()
calls functionHSG::checkAfterExecution()
which is used to check If the transaction did not maliciously affect the safe, However in case of delegatecall transactionsHSG::checkAfterExecution()
callsHSG::_checkSafeState()
which has an inbuilt check for change in number of owners:-if (keccak256(abi.encode(_safe.getOwners())) != _existingOwnersHash) revert CannotChangeOwners();
https://github.com/sherlock-audit/2024-11-hats-protocol/blob/main/hats-zodiac/src/HatsSignerGate.sol#L960
If A signer renounces their hat and calls
removeSigner()
and frontrunsexecTransaction()
It would change number of owners causing above check to fail and make transaction revert.A wearer of Hat can also use
claimSigner()
to achieve the same.Internal pre-conditions
TX uses Delegatecall operation.
External pre-conditions
No response
Attack Path
Safe.execTransaction()
using a delegatecall to appear in TxPoolremoveSigner()
orclaimSigner()
._checkSafeState()
would fail and Tx would revert.Impact
Griefing of Users, Bad UX.
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: