Radiant Neon Osprey
Medium
The missing check in return value of SafeManagerLib::execTransactionFromModule
can lead to an inconsistent state in the protocol
In SafeManagerLib::execTransactionFromModule
is missing a check of return value
No response
No response
No response
1.inconsistent state in the protocol
execSafeTransactionFromHSG
is called when exected _removeSigner
or _addSigner
.
From the IModuleManager::execTransactionFromModule
interface we can see:
function execTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation)
external
returns (bool success);
However when implement the execSafeTransactionFromHSG
from SafeManagerLib
https://github.com/sherlock-audit/2024-11-hats-protocol/blob/main/hats-zodiac/src/lib/SafeManagerLib.sol#L164-L166
function execSafeTransactionFromHSG(ISafe _safe, bytes memory _data) internal {
_safe.execTransactionFromModule({ to: address(_safe), value: 0, data: _data, operation: Enum.Operation.Call }); //@audit return status not checked ?
}
The return value if the transaction is sucess is not checked.
When protocol execute _addSigner
or _removeSigner
, removeOwner
or addOwnerWithThreshold
is called to safe
wallet. Once above transaction result in failed, the state between Hats
and safe
is inconsistent
check the return value of _safe.execTransactionFromModule