QA Report #233
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Low
token
addressesIn Cally.sol a user can call the createVault() function passing in a malicious attacker controlled token as the
address token
. This will then create a vault setting the evil token address as in storage. Attacker controlled assets should never be allowed in a protocol as they can return arbitrary values when called upon performing other malicious tasks then whats expected.##POC
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L160
##Tool Used
Manual Review
##Recommended Mitigation
Consider adding a mapping of approved tokens that can be passed in as an
token
address to the createVault() function to avoid malicious tokens.safeMint()
rather thanmint()
This POC It can be consider for dev if may necessary for better way
since
Cally.sol
was used to be main actor, it can be used safemint() instead of mint()##Tool Used
Manual Review
@return
was not setThis was not set information for @return, since other function() was set if @return was used so it can be added for good information to the others.
##Tool Used
Manual Review
Non Critical
It should be an
overrides function
but instead ofoverrides
, dev was usedovverides
. It can be remain the same, or it can be changed instead.##Tool Used
Manual Review
The text was updated successfully, but these errors were encountered: