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

It is not possible to call RestrictionManager.updateMembers through the gateway and update multiple members at the same time #393

Open
c4-submissions opened this issue Sep 14, 2023 · 11 comments
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue grade-a low quality report This report is of especially low quality QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@c4-submissions
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2023-09-centrifuge/blob/512e7a71ebd9ae76384f837204216f26380c9f91/src/token/RestrictionManager.sol#L62-L67

Vulnerability details

Impact

When updating multiple members, centrifuge must send one massage for each member they want to update to the gateway and can not do the update at once

Proof of Concept

All massages that are send from centrifuge to the chain the protocol is deployed are send to the gateway. For a massage to be executed the function Gateway. handle() needs to recognize its messageType. Once the messageType is confirmed to be one of those that can be processed from the handle() function the relevant functions in other contracts are called. The problem is that there is no messageType that enables the handle() function to call RestrictionManager.updateMembers. This means that there is no way to update multiple members at the same time using the gateway.

Tools Used

Manual review

Recommended Mitigation Steps

Add a messageType to the enum Call in the massages library and the corresponding functions to the library to identify this messageTyps as well as format and parse messages for updateMembers. Also add an additional if statement to Gateway.handle() that processes this type of messages.

Assessed type

Other

@c4-submissions c4-submissions added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Sep 14, 2023
c4-submissions added a commit that referenced this issue Sep 14, 2023
@c4-pre-sort
Copy link

raymondfam marked the issue as low quality report

@c4-pre-sort c4-pre-sort added the low quality report This report is of especially low quality label Sep 15, 2023
@c4-pre-sort
Copy link

raymondfam marked the issue as primary issue

@c4-pre-sort c4-pre-sort added the primary issue Highest quality submission among a set of duplicates label Sep 15, 2023
@c4-pre-sort c4-pre-sort removed the primary issue Highest quality submission among a set of duplicates label Sep 17, 2023
@c4-pre-sort
Copy link

raymondfam marked the issue as duplicate of #29

@c4-judge c4-judge added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Sep 25, 2023
@c4-judge
Copy link

gzeon-c4 marked the issue as unsatisfactory:
Invalid

@BenRai1
Copy link

BenRai1 commented Sep 28, 2023

@gzeon-c4 Can you elaborate why exactly this is invalid. Was not able to find anything that is suggesting the issue is invalid.

@c4-judge
Copy link

gzeon-c4 marked the issue as not a duplicate

@c4-judge
Copy link

gzeon-c4 removed the grade

@c4-judge c4-judge reopened this Sep 28, 2023
@c4-judge c4-judge added downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed unsatisfactory does not satisfy C4 submission criteria; not eligible for awards 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Sep 28, 2023
@c4-judge
Copy link

gzeon-c4 changed the severity to QA (Quality Assurance)

@gzeon-c4
Copy link

valid QA, not breaking anything since the singular updateMember is still available @hieronx

@gzeon-c4 gzeon-c4 mentioned this issue Sep 28, 2023
@c4-sponsor c4-sponsor added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Sep 28, 2023
@c4-sponsor
Copy link

hieronx (sponsor) acknowledged

@hieronx
Copy link

hieronx commented Sep 28, 2023

valid QA, not breaking anything since the singular updateMember is still available

Agreed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue grade-a low quality report This report is of especially low quality QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

8 participants