-
Notifications
You must be signed in to change notification settings - Fork 1
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
OperatorProposal._executeOperation()
should refund excess ETH
#30
Labels
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
duplicate-5
judge review requested
Judge should review this issue
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
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
Apr 14, 2023
On the fence on this one, presumably the call is made with with the correct msg.value to facilitate the transaction. Will leave open for sponsor comment, but most likely this should be QA |
0xean marked the issue as primary issue |
c4-judge
added
the
primary issue
Highest quality submission among a set of duplicates
label
Apr 15, 2023
0xble requested judge review |
Isn't this a duplicate of #5? |
Yes, good catch. |
0xean marked the issue as duplicate of #5 |
c4-judge
added
duplicate-5
and removed
primary issue
Highest quality submission among a set of duplicates
labels
Apr 25, 2023
0xean marked the issue as satisfactory |
c4-judge
added
the
satisfactory
satisfies C4 submission criteria; eligible for awards
label
Apr 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
duplicate-5
judge review requested
Judge should review this issue
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-04-party/blob/440aafacb0f15d037594cebc85fd471729bcb6d9/contracts/proposals/OperatorProposal.sol#L40-L45
Vulnerability details
Impact
There are excess ETH in
OperatorProposal._executeOperation
, and it should be refunded.Proof of Concept
OperatorProposal._executeOperation runs
data.operator.execute
withdata.operatorValue
of ETH.data.operator.execute{ value: data.operatorValue }(data.operatorData, executionData);
When
allowOperatorsToSpendPartyEth
is false, it works when data.operatorValue <= msg.value.So only
data.operatorValue
will be used out ofmsg.value
whenallowOperatorsToSpendPartyEth
is false. We should refund the excess amount.Tools Used
Manual Review
Recommended Mitigation Steps
We should refund
msg.value
-data.operatorValue
whenallowOperatorsToSpendPartyEth
is false.The text was updated successfully, but these errors were encountered: