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

OrderStatus never return 0 #521

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

OrderStatus never return 0 #521

code423n4 opened this issue Aug 1, 2022 · 1 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 sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-07-golom/blob/e5efa8f9d6dda92a90b8b2c4902320acf0c26816/contracts/core/GolomTrader.sol#L177-L180

Vulnerability details

Impact

When the signature is invalid, the require statement is false, the execution stops, and the transaction gets rolled back. The function never returns 0.

Proof of Concept

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

Recommended Mitigation Steps

remove the require statement.

@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 Aug 1, 2022
code423n4 added a commit that referenced this issue Aug 1, 2022
@0xsaruman 0xsaruman added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label Aug 20, 2022
@dmvt
Copy link
Collaborator

dmvt commented Oct 17, 2022

Downgrading to QA. This is an issue with comments / functioning according to spec.

@dmvt dmvt closed this as completed Oct 17, 2022
@dmvt dmvt added 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 17, 2022
@dmvt dmvt reopened this Oct 21, 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 sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

3 participants