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

QA Report #259

Open
code423n4 opened this issue Aug 6, 2022 · 0 comments
Open

QA Report #259

code423n4 opened this issue Aug 6, 2022 · 0 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax valid

Comments

@code423n4
Copy link
Contributor

Invalid signer are also accepted

Contract:
Disputes

Issue:
In case signature provided is invalid, SignatureDecoder.recoverKey will return with 0 address. The function still process this 0 address and creates a new dispute with 0 address owner

Recommendation:
Kindly add below check:

function raiseDispute(bytes calldata _data, bytes calldata _signature)
        external
        override
        onlyProject
    {
        // Recover signer from signature
        address _signer = SignatureDecoder.recoverKey(
            keccak256(_data),
            _signature,
            0
        );
require(_signer != address(0), "Incorrect signature");
}

initialize can be called by any external user

Contract:
Disputes

Issue:
It seems that user can call the initialize function before owner has chance to do the same. This will initialize the homeFi variable incorrectly. Although this is not serious as Owner can immediately discard this contract but would be good to restrict this function

Recommendation:
Kindly allow only owner/deployer to call this function

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Aug 6, 2022
code423n4 added a commit that referenced this issue Aug 6, 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 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax valid
Projects
None yet
Development

No branches or pull requests

2 participants