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 event emission after sensitive actions #104

Closed
code423n4 opened this issue Feb 17, 2022 · 2 comments
Closed

Lack of event emission after sensitive actions #104

code423n4 opened this issue Feb 17, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-02-redacted-cartel/blob/92c4d5810df7b9de15eae55dc7641c8b36cd799d/contracts/TokemakBribe.sol#L108-L110

Vulnerability details

Impact

Event missing after changes of _round parameter by admin or team member. This makes other team members being unaware of round when setting proposals.

Lack of event emits after critical parameter change is a known vulnerability than can range from low to high risk , depending on the the parameter.

Some examples:

LOW code-423n4/2021-06-gro-findings#5

MEDIUM code-423n4/2021-08-floatcapital-findings#85
https://blog.openzeppelin.com/uma-audit-phase-4/ (see M01)

HIGH https://blog.openzeppelin.com/audius-contracts-audit/#high

Proof of Concept

function setRound(uint256 _newRound) external onlyAuthorized {   // TokemakBribe.sol#L108-L110
    _round = _newRound;                
}

Tools Used

Manual code revision

Recommended Mitigation Steps

event RoundChanged(uint round);     

function setRound(uint256 _newRound) external onlyAuthorized {   // TokemakBribe.sol#L108-L110
    _round = _newRound;    
    emit RoundChanged(_newRound);
        
}
@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 Feb 17, 2022
code423n4 added a commit that referenced this issue Feb 17, 2022
@kphed kphed added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Feb 18, 2022
@GalloDaSballo
Copy link
Collaborator

The finding is informational in nature, so am downgrading to non-critical

@GalloDaSballo GalloDaSballo added 0 (Non-critical) and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Feb 27, 2022
@CloudEllie CloudEllie added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax duplicate This issue or pull request already exists and removed 0 (Non-critical) labels Mar 22, 2022
@CloudEllie
Copy link

Grouping this with warden's QA report, #117

@CloudEllie CloudEllie added 0 (Non-critical) QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax 0 (Non-critical) labels Mar 22, 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 duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

4 participants