34481 - [BC - Critical] Bypassing sender verification in gossip-final-s...
Submitted on Aug 13th 2024 at 20:13:43 UTC by @doxtopzhivago for Boost | Shardeum: Core
Report ID: #34481
Report type: Blockchain/DLT
Report severity: Critical
Target: https://github.com/shardeum/shardus-core/tree/dev
Impacts:
Network not being able to confirm new transactions (total network shutdown)
Description
Brief/Intro
The gossip-final-state gossip handler lacks incoming message verification. Consequently, this vulnerability allows various attacks, such as forcing transactions to fail or manipulating account balances after a transaction is executed.
Vulnerability Details
During the execution of a transaction validators in the execution group exchange final account data with other nodes in the transaction group. The new consensus protocol introduces restrictions on sender, receiver and data. However, these restrictions are absent in the gossip-final-state handler, allowing control for attacker to the transaction's final state.
When a transaction is received by a malicious validator, it can send a gossip-final-state message to the validators in the transaction group with incorrect final account state information after a brief delay. This misinformation can include an incorrect hash or an incorrect final balance. If the hash is incorrect the transaction will fail since it doesn't match the hash in the vote, triggering the repair process on the nodes from the non-execution group.
Impact Details
This vulnerability impacts any transaction executed in the network, as there is no restriction preventing an attacker from being a part of either the transaction or execution group, and gives full control over the transaction failure status.
References
https://github.com/shardeum/shardus-core/blob/72fba67d3a551f21368c8b0fe94f951c8f5cc4f8/src/state-manager/TransactionQueue.ts#L777
Proof of Concept
A patch should be applied to the malicious validator in the Shardeum-core repository. I have created a POC that allows a malicious node to fail all transactions it knows about on non-execution group nodes. Notably, the node doesn't need to be part of the transaction or execution group. This will force the repair process on these nodes.
To test the POC:
Last updated
Was this helpful?