-
Notifications
You must be signed in to change notification settings - Fork 2
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
Protocol does not check inside GuardianProver::approve() if all the guardians are approving the same proof #248
Comments
minhquanym marked the issue as primary issue |
minhquanym marked the issue as sufficient quality report |
I think this is a valid report, although the severity is not high. Fixed in this PR: https://github.com/taikoxyz/taiko-mono/pull/16606/files |
dantaik (sponsor) confirmed |
@dantaik - can you clarify why you don't believe this to be impactful? It does seem M is warranted as the function of the protocol is affected, no?
|
0xean marked the issue as satisfactory |
0xean marked the issue as selected for report |
Hi @0xean, I think this issue should be of QA-severity, here's why: If there is no check present, the guardians sending another proof could be considered as incorrect input supplied by a trusted role. This falls under QA since trusted roles are providing incorrect parameters. Also to note, the guardians are selected by the DAO and Security council as Dan mentioned in his BCR video linked in the README. Overall, I think the check is more of a sanity check than a major issue to the protocol's functionality. Would like to hear your opinion on this in case I'm misjudging. Thank you! |
See #205 -
To me the above represents a privilege escalation or if nothing malicious an issue that could affect the functioning of the protocol. Based on that I think M is correct. |
0xean marked issue #205 as primary and marked this issue as a duplicate of 205 |
0xean marked the issue as not selected for report |
Lines of code
https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/L1/provers/GuardianProver.sol#L33
Vulnerability details
Summary
The natspec for GuardianProver::approve() says the following on L33 but the "sent the same proof" clause is never really checked inside the function:
Description & Impact
approved_ = true
is(9 + 1) / 2 = 5
.proofX
while callingapprove()
.proofY
.proofX
. Since thehash
on L46 is calculated without involving the proof, L47 will returntrue
at the 5th guardian's call even though Guardian4 had usedproofY
.proveBlock()
is called with_proof
equallingproofX
._proof
Guradian5 uses while callingapprove()
will be used to callproveBlock()
on L51, irrespective of whatever the previous guardians passed.Thus the guardian proof is approved even when in reality the required votes have not been achieved.
Tools Used
Manual review
Recommended Mitigation Steps
Compare the
_proof.data
to make sure approval for the same proof is being provided by all the guardians.Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: