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

0rpse - lz_receive can be called with any user account to steal from users #158

Open
sherlock-admin3 opened this issue Oct 27, 2024 · 0 comments
Labels
Sponsor Confirmed The sponsor acknowledged this issue is valid

Comments

@sherlock-admin3
Copy link

sherlock-admin3 commented Oct 27, 2024

0rpse

High

lz_receive can be called with any user account to steal from users

Summary

OApp's lz_receive instruction is freely callable by anyone once the message gets verified. As user account in this instruction is not verified or included in the message, any user account can be specified for the instruction and the message would still go through, thus enabling withdrawal to any account.

Root Cause

In oapp_lz_receive.rs lack of checks for user accounts that the tokens will be sent to
https://github.com/sherlock-audit/2024-09-orderly-network-solana-contract/blob/main/solana-vault/packages/solana/contracts/programs/solana-vault/src/instructions/oapp_instr/oapp_lz_receive.rs#L13-L146

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

After a message is verified and ready for execution, call lz_receive with arbitrary accounts to steal funds from vault.

Impact

Users funds can be stolen.

PoC

No response

Mitigation

Either include user accounts in the message or include checks for the accounts in instruction handler.

@sherlock-admin3 sherlock-admin3 added the Sponsor Confirmed The sponsor acknowledged this issue is valid label Nov 3, 2024
@sherlock-admin4 sherlock-admin4 changed the title Dandy Lavender Terrier - lz_receive can be called with any user account to steal from users 0rpse - lz_receive can be called with any user account to steal from users Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsor Confirmed The sponsor acknowledged this issue is valid
Projects
None yet
Development

No branches or pull requests

1 participant