setupParticipant() function does not check for zero address #130
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
jayjonah8
Vulnerability details
Impact
The setupParticipant() function in AuctionParticipant.sol does not have require statements to protect again contracts that do not yet exist. It sets the addresses for " _impliedCollateralService", "_rewardToken", and "_auction" and can only be called once so its vital to have this guard in place.
Proof of Concept
https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/AuctionParticipant.sol#L26
Tools Used
Manual code review
Recommended Mitigation Steps
Add require checks for the addresses that are passed in the setupParticipant() function checking if they exist like: require("address" != address(0), "contract does not exist")
The text was updated successfully, but these errors were encountered: