Solana zetaclient inbound observer is blocked indefinitely when an additional account is passed to the `call` instruction
The Solana zetaclient's inbound parser expected exactly one signer account for the gateway `call` instruction, but the Solana program itself ignores extra accounts. An attacker could send a valid `call` transaction with an additional account, causing the parser to error and the observer to re-scan the same transaction indefinitely, blocking all other inbound Solana transactions.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/326
Found by
berndartmueller
Summary
By providing an additional account to the Solana gateway call function, the Solana zetaclient will error, preventing processing other inbound Solana transactions.
Root Cause
The Solana gateway call function expects one account, the signer, to be passed in the instruction.
programs/gateway/src/contexts.rs#L109-L114
109: #[derive(Accounts)]
110: pub struct Call<'info> {
111: /// The account of the signer making the call.
112: #[account(mut)]
113: pub signer: Signer<'info>,
114: }
Additional accounts can be passed by the user, they will just be ignored by the program.
However, the Solana zetaclient expects the instruction to have exactly one signer account. If there is more than one signer account, it errors out with the message want only 1 signer account, got %d.
pkg/contracts/solana/inbound.go#L264-L266
238: func ParseInboundAsCall(
239: tx *solana.Transaction,
240: instructionIndex int,
241: slot uint64,
242: ) (*Inbound, error) {
... // [...]
257:
258: // get the sender address (skip if unable to parse signer address)
259: instructionAccounts, err := instruction.ResolveInstructionAccounts(&tx.Message)
260: if err != nil {
261: return nil, err
262: }
263:
264: if len(instructionAccounts) != 1 {
265: return nil, fmt.Errorf("want only 1 signer account, got %d", len(instructionAccounts))
266: }
This error is propagated up to the FilterInboundEventsAndVote function, which is called in the ObserveInbound function.
zetaclient/chains/solana/observer/inbound.go#L88-L92
88: // filter inbound events and vote
89: if err = ob.FilterInboundEventsAndVote(ctx, txResult); err != nil {
90: // we have to re-scan this signature on next ticker
91: return errors.Wrapf(err, "error FilterInboundEventAndVote for sig %s", sigString)
92: }
Due to this error, the same transaction will be re-scanned on the next ticker, preventing other inbound Solana transactions from being processed indefinitely.
Internal Pre-conditions
None
External Pre-conditions
None
Attack Path
- The attacker sends a Solana transaction with the
callinstruction to the Solana gateway program with an additional account. - The Solana transaction is executed, and the
callinstruction is processed successfully. - The Solana zetaclient processes the transaction and calls the
ParseInboundAsCallfunction. The checklen(instructionAccounts) != 1fails, as there are two accounts passed in the instruction. - The error is propagated up to the
ObserveInboundfunction, which re-scans the same transaction on the next ticker. - The error is surfaced repeatedly, preventing any other inbound Solana transactions from being processed.
Impact
The Solana inbound processing is blocked indefinitely, preventing any other inbound Solana transactions from being processed.
PoC
To demonstrate how an additional account breaks this check, we can run theTestSolanaToZEVMCall E2E test case. This test case calls the Solana gateway's call function with an additional account.
Update the CreateSOLCallInstruction function to add an additional account to the instruction:
return &solana.GenericInstruction{
ProgID: r.GatewayProgram,
DataBytes: callData,
AccountValues: []*solana.AccountMeta{
solana.Meta(signer).WRITE().SIGNER(),
+ solana.Meta(solana.SystemProgramID),
},
}
Run the test case with the following command:
make start-solana-test
After a while, when the E2E test is running, you will see the following error in the Docker logs of the zetaclient (both, 1 and 2):
2025-05-07T12:21:46Z INF got wrong amount of signatures chain=902 chain_network=solana method=ObserveInbound module=inbound signatures=1
2025-05-07T12:21:46Z ERR task failed error="error FilterInboundEventAndVote for sig 2f4P2EAtrh7HitBEU4ZzvPCw72PcAR5EjqPqfTaqi5oyvFiY8zUwNdnvK9mxWN3kumEpnWWXCasbiNhPNkTD3cj: error FilterInboundEvent: error ParseInboundAsCall: want only 1 signer account, got 2" module=scheduler task.group=sol:902 task.name=observe_inbound task.type=interval_ticker
The error will be logged repeatedly as the zetaclients re-scan this same transaction. Any other inbound Solana transaction will not be processed.
Mitigation
Like other instances in the Solana zetaclient, the check for the number of accounts should use < 1 instead of != 1. This will allow the program to process the transaction successfully, even if additional accounts are passed in the instruction.
264: if len(instructionAccounts) < 1 {
265: return nil, fmt.Errorf("want required 1 signer account, got %d", len(instructionAccounts))
266: }
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/zeta-chain/node/pull/3895
gjaldon
The issue is fixed by changing the check to less than the accountsNumberCall so that more instruction accounts can be passed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The zetaclient parser enforced an exact account count (`!= 1`) while the Solana program accepted and ignored additional accounts, so a valid transaction could break the parser.
What the attacker needed
Ability to send a Solana transaction to the gateway
How it was found
- Send a Solana transaction with the `call` instruction to the gateway program, including an additional account.
- The Solana program executes the `call` instruction successfully, ignoring the extra account.
- The zetaclient parses the transaction and fails the check that requires exactly one account.
- The error propagates to the inbound observer, which re-scans the same transaction on the next ticker.
- The error repeats, preventing any other inbound Solana transactions from being processed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A cross-chain client watches Solana transactions to process them. It assumed a certain transaction would always have exactly one account attached, but the Solana program allowed extra accounts. By sending a transaction with an extra account, an attacker made the client crash on that transaction and get stuck retrying it forever, so no other transactions could be handled.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.