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

LayerZero Channel can be blocked by an attacker #309

Closed
code423n4 opened this issue Oct 25, 2022 · 2 comments
Closed

LayerZero Channel can be blocked by an attacker #309

code423n4 opened this issue Oct 25, 2022 · 2 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists invalid This doesn't seem right partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%)

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/module/LayerZeroModule.sol#L180

Vulnerability details

Impact

According to the LayerZero docs, the default behavior is that when a transaction on the destination application fails, the channel between the source and destination is blocked. Before any new transactions can be executed, the failed transaction has to be retried until it succeeds.

See https://layerzero.gitbook.io/docs/faq/messaging-properties#message-ordering & https://layerzero.gitbook.io/docs/guides/advanced/nonblockinglzapp

An attacker is able to initiate a transaction they know will fail to block the channel.

Proof of Concept

The LayerZeroModule does not have the non-blocking approach as seen here

Example implementation here by LayerZero here

Tools Used

VSCode

Recommended Mitigation Steps

Use the non-blocking approach as described here.
Reference for similar error here

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Oct 25, 2022
code423n4 added a commit that referenced this issue Oct 25, 2022
@Picodes
Copy link

Picodes commented Oct 26, 2022

Seems to be a copy paste from a previous contest (Velodrome if I recall correctly). No PoC of how a transaction could revert on the source chain.

@gzeoneth gzeoneth added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label Oct 28, 2022
@gzeoneth
Copy link
Member

Duplicate of #244

@gzeoneth gzeoneth marked this as a duplicate of #244 Oct 28, 2022
@gzeoneth gzeoneth added duplicate This issue or pull request already exists partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%) and removed sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue labels Oct 28, 2022
@gzeoneth gzeoneth added the invalid This doesn't seem right label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists invalid This doesn't seem right partial-25 Incomplete articulation of vulnerability; eligible for partial credit only (25%)
Projects
None yet
Development

No branches or pull requests

3 participants