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

silver_eth - There is insufficient access control on updating an account position #83

Open
sherlock-admin3 opened this issue Sep 13, 2024 · 1 comment

Comments

@sherlock-admin3
Copy link

sherlock-admin3 commented Sep 13, 2024

silver_eth

High

There is insufficient access control on updating an account position

this is the check to ensure only authorized can modify a position
https://github.com/sherlock-audit/2024-08-perennial-v2-update-3/blob/main/perennial-v2/packages/perennial/contracts/libs/InvariantLib.sol#L78-L82
hoevere that check is done here
https://github.com/sherlock-audit/2024-08-perennial-v2-update-3/blob/main/perennial-v2/packages/perennial/contracts/Market.sol#L501-L502
which calls this
https://github.com/sherlock-audit/2024-08-perennial-v2-update-3/blob/main/perennial-v2/packages/perennial/contracts/MarketFactory.sol#L77-L88
the issue is anybody can make themselves an extension for an account
https://github.com/sherlock-audit/2024-08-perennial-v2-update-3/blob/main/perennial-v2/packages/perennial/contracts/MarketFactory.sol#L100-L103

effectively making them an operator thus allowing them to modify a position and withdraw the accouns collateral

@arjun-io
Copy link

Appears to be a duplicate of #52

@sherlock-admin3 sherlock-admin3 changed the title Low Grey Mustang - There is insufficient access control on updating an account position silver_eth - There is insufficient access control on updating an account position Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants