sherlock-audit / 2023-06-symmetrical-judging

5 stars 4 forks source link

AkshaySrivastav - Validation of Muon signatures can be frontrunned by increasing nonces #304

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

AkshaySrivastav

high

Validation of Muon signatures can be frontrunned by increasing nonces

Summary

The validation of Muon network signatures depend upon nonces of users. Anyone can do empty deposits to increase the nonce so that the signature verification fails.

Vulnerability Detail

By doing 0 amount deposit any user can increase his nonce value.

The nonce values are read by Muon network before signing the requested data. The nonce value is also read by Symmetrical protocol during signature validation. In case there is any mismatch between the nonces the signature validation fails.

The functions impacted are:

These functions are used throughout the protocol, specially in liquidations. Change in user's nonce will result in liquidation txns getting reverted.

Impact

Scenario:

The attack can be performed to DoS other crucial protocol operations by both partyA and partyB.

Code Snippet

https://github.com/sherlock-audit/2023-06-symmetrical/blob/main/symmio-core/contracts/facets/Account/AccountFacetImpl.sol#L19-L25

Tool used

Manual Review

Recommendation

Fixing this issue could be tricky as the protocol heavily relies on Muon signatures and user nonces. Maybe not incrementing user nonce where that is not crucial (like deposits) could be a possible solution.

Duplicate of #233