-
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
retryMessage unable to handle edge cases. #298
Comments
minhquanym marked the issue as primary issue |
minhquanym marked the issue as sufficient quality report |
I'd dispute this with an addition (see end sentence). 2 cases mentioned here:
Intentional to NOT refund sender when he/she is banned. (Tho we might remove the "banAddress", because it confuses a lot of people. The original intention behind banning an address is: NOT be able to call another , very important contract (
So as we considering removing banning addresses (and not allow |
dantaik (sponsor) disputed |
0xean changed the severity to QA (Quality Assurance) |
0xean marked the issue as grade-b |
I believe this bug report was understood.
Therefore if an address is banned or if a message is suspended after being it was placed in the RETRIABLE state. Invocation of the banned address can occur, and suspended messages will be fulfilled. ALthough initially submitted as a Med, I believe this is a High severity bug. Even after excluding the banned address, suspended messages can immediately be fulfilled. Also according to the code here: https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/bridge/Bridge.sol#L82-L95
This restriction is not in the code. |
Hi @0xean, adding on to the above comment. I think the sponsor has misunderstood what this issue and the duplicates are entailing here. The sponsor seems to be talking about not refunding the banned addresses and suspended messages (especially not invoking invokeMessageCall on both of them). The issues here are talking about how this invoking is possible i.e. the executions validly go through due to the missing checks. I think the sponsor's comments itself confirm the issue: Banned addresses sponsor comments: Suspended messages sponsor comments: Regarding the timeline for banning and suspending: Please consider re-evaluating this issue and its duplicates. Thank you! |
@Josephdara @mcgrathcoutinho @0xean @dantaik @Brechtpd |
Thanks to everyone for their inputs, to add to the discussion regarding the suspension mechanism. Since monitoring for "fake messages" is not enforced in the Taiko contracts as the goal/purpose of the suspension mechanism is to is to manually intervene and prevent "fantom/fake" transactions that can be proven (a bug in the Merkle tree), it's logical to assume that noticing a fake message in a RETRIABLE status it's entirely possible. Since monitoring and suspending are a manual action which isn't enforced/automatic contract logic, rather it's a third party mechanism/tool/effort, it is theoretically possible for a message with status RETRIABLE to be passed as a legitimate one since the suspension mechanism doesn't work for these messages. If the recalling and processing of messages employ an invocation-check mechanism, it's only logical for the retrial mechanism to do so too as there is a theoretical possibility for the scenario to occur within the realms of the audit scope. |
This previously downgraded issue has been upgraded by 0xean |
0xean marked the issue as satisfactory |
I'm not sure how this is going to be grouped. But I believe there are two separate issues here:
If (2) was not pointed out reported, only a fix for (1) would've been implemented and vice versa. Combining them both will make the judge's life easier but basing it off root causes, I think they stem differently. Will agree with the judge's final verdict though, since there is only a thin line separating them. |
0xean marked the issue as selected for report |
using this issue to aggregate all of the issues around ban list functionality that has since been removed from the sponsors code base. |
Lines of code
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/bridge/Bridge.sol#L309-L337
Vulnerability details
Impact
The function
retryMessage()
is unable to handle some edge scenarios listed below.RETRIABLE
state.RETRIABLE
state.Proof of Concept
A message is set to
RETRIABLE
in theprocessMessage
when transfer fails or if the target address does not satisfy some conditions.The issue here is, when the team attempts suspension of a message which is in a
RETRIABLE
state, the code does not block execution.Same or a banned address.
This is because the
proofReceipt[msgHash]
which handles suspension is not checked. TheaddressBanned[_addr]
is not checked too.Tools Used
Manual Review, Josephdara
Recommended Mitigation Steps
Recheck necessary details to verify that the transaction is still good to go.
Check the
proofReceipt[msgHash].receivedAt
and theaddressBanned[_addr]
Assessed type
Other
The text was updated successfully, but these errors were encountered: