Skip to content
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

H-01 MitigationConfirmed #30

Open
code423n4 opened this issue Aug 22, 2023 · 1 comment
Open

H-01 MitigationConfirmed #30

code423n4 opened this issue Aug 22, 2023 · 1 comment
Labels
mitigation-confirmed MR-H-01 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

Vulnerability details

Issue seems to be resolved, since a token/collateral wouldn’t be added to the erc20All/collsAll array unless they’re a registered asset.
This will ensure that the len will never exceed (or reach, to be more precise) assetRegistry.size() and therefore there’s no longer a risk of index out of bounds error.
The solution costs some extra gas as noted in my comment on the original issue
The catch block uses the check that it’s not an out of gas error, as said in the past an empty error can be due to other errors. But in this case the logic of toAsset() is rather simple and there doesn’t seem to be a case where an empty error would be raised for other reasons than gas.

code423n4 added a commit that referenced this issue Aug 22, 2023
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Aug 28, 2023
@c4-judge
Copy link

0xean marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-H-01 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants