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 #804

Open
code423n4 opened this issue Aug 1, 2022 · 1 comment
Open

QA Report #804

code423n4 opened this issue Aug 1, 2022 · 1 comment
Labels
bug Something isn't working old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

code423n4 commented Aug 1, 2022

CodeArena QA Report

Vulnerability detail - Duplicate Code

Impact

The validateOrder() function in GolomTrader.sol checks twice that the recovered signature signer is o.signer.

Details/Proof-Of-Concept

The following code is encountered from L177 of GolomTrader.sol:

require(signaturesigner == o.signer, 'invalid signature');
if (signaturesigner != o.signer) {
    return (0, hashStruct, 0);
}

The require() statement ensures that the following condition is never met. If signaturesigner and o.signer don't match the transaction will revert with an 'invalid signature' error instead of returning a status code of 0.

Suggested Mitigation Steps

Remove the if statement from L178-L180.

Tools Used

Saw it reading in VSCode

@code423n4 code423n4 added bug Something isn't working old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Aug 1, 2022
code423n4 added a commit that referenced this issue Aug 1, 2022
@kartoonjoy
Copy link
Collaborator

Edited the word Gas report to QA report in the wardens title. Warden 0xMatt is aware. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working old-submission-method 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

2 participants