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

Incorrect implementation of updateEmergencyCouncil #153

Closed
howlbot-integration bot opened this issue Sep 16, 2024 · 2 comments
Closed

Incorrect implementation of updateEmergencyCouncil #153

howlbot-integration bot opened this issue Sep 16, 2024 · 2 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-162 edited-by-warden 🤖_41_group AI based duplicate group recommendation satisfactory satisfies C4 submission criteria; eligible for awards sufficient quality report This report is of sufficient quality upgraded by judge Original issue severity upgraded from QA/Gas by judge

Comments

@howlbot-integration
Copy link

Lines of code

https://github.com/code-423n4/2024-08-superposition/blob/4528c9d2dbe1550d2660dac903a8246076044905/pkg/seawater/src/lib.rs#L1109-L1124

Vulnerability details

Impact

The emergency_council address can never be updated once set

Vulnerability Details

It appears that this issue is caused by a copy-paste error. The developer seems to have copied the code from the update_nft_manager_9_B_D_F_41_F_6 function and used it as the basis for the update_emergency_council_7_D_0_C_1_C_58 function. However, they forgot to change the variable name from nft_manager to emergency_council. As a result, the function does not work as intended. Instead of setting the address for emergency_council, the function mistakenly sets it for nft_manager.

This oversight introduces a significant security risk because the nft_manager has the authority to change the owner of any user's position, which is a higher level of authority compared to the emergency_council, which can only disable the pool. Therefore, this bug not only renders the intended function inoperative but also poses a potential security vulnerability.

Tools Used

Manual analysis

Recommended Mitigation Steps

Replace the nft_manager on L1121 with emergency_council

Assessed type

Access Control

@howlbot-integration howlbot-integration bot added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value 🤖_41_group AI based duplicate group recommendation bug Something isn't working duplicate-64 edited-by-warden sufficient quality report This report is of sufficient quality labels Sep 16, 2024
howlbot-integration bot added a commit that referenced this issue Sep 16, 2024
@c4-judge c4-judge added duplicate-162 3 (High Risk) Assets can be stolen/lost/compromised directly upgraded by judge Original issue severity upgraded from QA/Gas by judge and removed duplicate-64 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Sep 23, 2024
@c4-judge
Copy link
Contributor

alex-ppg changed the severity to 3 (High Risk)

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Sep 23, 2024
@c4-judge
Copy link
Contributor

alex-ppg marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate-162 edited-by-warden 🤖_41_group AI based duplicate group recommendation satisfactory satisfies C4 submission criteria; eligible for awards sufficient quality report This report is of sufficient quality upgraded by judge Original issue severity upgraded from QA/Gas by judge
Projects
None yet
Development

No branches or pull requests

1 participant