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

Unchecked low level call #76

Open
code423n4 opened this issue Oct 26, 2021 · 1 comment
Open

Unchecked low level call #76

code423n4 opened this issue Oct 26, 2021 · 1 comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working

Comments

@code423n4
Copy link
Contributor

Handle

loop

Vulnerability details

In MochiVaultFactory a low level call is made to update the Beacon template to _newTemplate: address(beacon).call(abi.encode(_newTemplate));. Afterwards the _newTemplate is written to the template variable, even if the low level call failed.

Proof of Concept

https://github.com/code-423n4/2021-10-mochi/blob/main/projects/mochi-core/contracts/vault/MochiVaultFactory.sol#L22

Tools Used

Slither

Recommended Mitigation Steps

Check if low level call was successful using the boolean return value of a low level call.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Oct 26, 2021
code423n4 added a commit that referenced this issue Oct 26, 2021
@r2moon r2moon added sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue invalid This doesn't seem right and removed sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue labels Oct 27, 2021
@ghoul-sol
Copy link
Collaborator

I'm not sure why it's marked invalid, the finding seems valid to me.

@ghoul-sol ghoul-sol removed the invalid This doesn't seem right label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants