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

[NAZ-M4] Incorrect Address Emitted #481

Closed
code423n4 opened this issue Sep 19, 2022 · 1 comment
Closed

[NAZ-M4] Incorrect Address Emitted #481

code423n4 opened this issue Sep 19, 2022 · 1 comment
Labels
bug Something isn't working 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 sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-09-y2k-finance/blob/main/src/SemiFungibleVault.sol#L37

Vulnerability details

Impact

The Deposit() event in deposit() is emitted when an asset is deposited from msg.sender and shares are sent to a receiver. Its second parameter indicates the address to which the asset is owned by. However, the Deposit() event emitted uses receiver(owner of shares) instead of the msg.sender's(owner of assets) address . This may mislead protocol user interfaces and off-chain monitoring systems to misinterpret the amounts of assets being redeemed or minted to cause confusion, flagging of alerts or DoS.

Tools Used

Manual Review

Recommended Mitigation Steps

Change emit Deposit(msg.sender, receiver, id, assets, shares) To emit Deposit(msg.sender, msg.sender, id, assets, shares) or change the wording in the natspec so that it reflects what is actually happening.

@code423n4 code423n4 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 19, 2022
code423n4 added a commit that referenced this issue Sep 19, 2022
@MiguelBits MiguelBits added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Sep 29, 2022
@HickupHH3
Copy link
Collaborator

wrong param emitted in event would be low-risk. downgrading. part of #474

@HickupHH3 HickupHH3 added 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 and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Oct 18, 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 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 sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

4 participants