-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssetLogic :Must safeApprove 0 first #75
Comments
Duplicate of #154 |
Duplicate of #154 |
While it is a duplicate of a more severe issue, this warden has failed to explain this properly. Downgrading to |
Eh, it seems most dupes of the primary issue are similar in this sense. Might as well put them all on the same level of severity. |
Upon further thought, there is no mention of impact in how funds are handled during bridge transfers. Will downgrade to |
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/4dd6149748b635f95460d4c3924c7e3fb6716967/contracts/contracts/core/connext/libraries/AssetLogic.sol#L347-L348
Vulnerability details
Impact
The safeApprove() function cannot set a non-zero value to a non-zero value, so before safeApprove a non-zero value, you need to safeApprove 0.
Proof of Concept
https://github.com/code-423n4/2022-06-connext/blob/4dd6149748b635f95460d4c3924c7e3fb6716967/contracts/contracts/core/connext/libraries/AssetLogic.sol#L347-L348
Tools Used
None
Recommended Mitigation Steps
Use safeApprove(_spender, 0) to set the allowance to zero immediately before each of the existing safeApprove() calls.
The text was updated successfully, but these errors were encountered: