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

who in updateStreamInternal #170

Closed
code423n4 opened this issue Dec 6, 2021 · 2 comments
Closed

who in updateStreamInternal #170

code423n4 opened this issue Dec 6, 2021 · 2 comments
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

function updateStreamInternal accepts a parameter 'who' but uses msg.sender when accessing the stream:

  function updateStreamInternal(address who) internal {
    ...
    TokenStream storage ts = tokensNotYetStreamed[msg.sender];

This will not update the expected stream when who != msg.sender. Currently, this function is only called from within the modifier, and the modifier is applied with msg.sender only, but still this risk needs to be addressed.

Recommended Mitigation Steps

Consider either updating 'who', or totally getting rid of this parameter to avoid confusion.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 6, 2021
code423n4 added a commit that referenced this issue Dec 6, 2021
@brockelmore brockelmore added the disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) label Jan 5, 2022
@brockelmore
Copy link
Collaborator

gas optimization

@brockelmore
Copy link
Collaborator

duplicate #125

@0xean 0xean added the duplicate This issue or pull request already exists label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants