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

Lack of address validation in MasterDeployer.addToWhitelist #138

Open
code423n4 opened this issue Sep 29, 2021 · 1 comment
Open

Lack of address validation in MasterDeployer.addToWhitelist #138

code423n4 opened this issue Sep 29, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Warden finding sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

GalloDaSballo

Vulnerability details

Impact

addToWhitelist
https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/deployer/MasterDeployer.sol#L50

Is not checking for _factory being different from address(0)

Recommended Mitigation Steps

Add
require(_factory != address(0))

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Warden finding labels Sep 29, 2021
code423n4 added a commit that referenced this issue Sep 29, 2021
@sarangparikh22 sarangparikh22 added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label Oct 5, 2021
@sarangparikh22
Copy link
Collaborator

sarangparikh22 commented Oct 5, 2021

This doesn't put anything to risk as the address(0) will not have the deployPool(), hence the function call should revert. I don't think this is critical issue. This should be changed to non-critical (0)

@ninek9 ninek9 reopened this Oct 22, 2021
@alcueca alcueca added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Warden finding 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

4 participants