Sparkly Fleece Mammoth
High
The type and size of data required for function getSupplyCollateralCalldata
was not specified. As it is an external function, malicious actors can try pass, malicious data such an attack contract byte data to break or re-enter the code.
Large, meaningless data can also be passed by malicous actors, overloading the system, incuring gas cost and
causing griefing attacks or DOS
- attacker writes a malicious contract with the plan to take over ISetToken contract .
- attacker passes the bytecode of the contract to
function getSupplyCollateralCalldata
which calls back intofunction invokeSupplyCollateral
which at the end of this function IsetToken is invoked https://github.com/sherlock-audit/2024-10-morpho-x-index/blob/main/index-protocol/contracts/protocol/integration/lib/Morpho.sol#L74
No response
No response
- specify the type/ size if data, if possible
- Use a re-entrant modifier from tested contracts like openzeppelin contracts