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

Interface name reused #67

Closed
code423n4 opened this issue May 16, 2022 · 3 comments
Closed

Interface name reused #67

code423n4 opened this issue May 16, 2022 · 3 comments
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L10-19
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/CrvDepositorWrapper.sol#L9-16

Vulnerability details

Impact

If a codebase has two contracts the similar names, the compilation artifacts will not contain one of the contracts with the duplicate name.

ICrvDepositor is re-used:
- ICrvDepositor (AuraStakingProxy.sol#10-19)
- ICrvDepositor (CrvDepositorWrapper.sol#9-16)

Proof of Concept

https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L10-19
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/CrvDepositorWrapper.sol#L9-16

Tools Used

Manual

Recommended Mitigation Steps

Remove or rename the interface.

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels May 16, 2022
code423n4 added a commit that referenced this issue May 16, 2022
@0xMaharishi
Copy link

Duplicate of #12

@0xMaharishi 0xMaharishi marked this as a duplicate of #12 May 25, 2022
@0xMaharishi 0xMaharishi added duplicate This issue or pull request already exists disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons and removed sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels May 25, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jun 20, 2022

As with #12, this is definitely a code quality issue and a good report, but does not constitute a potential loss of funds or even disfunction in the protocol itself. Downgrading to QA.

@dmvt dmvt added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed duplicate This issue or pull request already exists 3 (High Risk) Assets can be stolen/lost/compromised directly labels Jun 20, 2022
@dmvt dmvt added the duplicate This issue or pull request already exists label Jul 8, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jul 8, 2022

Grouping this with the warden’s QA report, #59

@dmvt dmvt closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

3 participants