#42495 [BC-High] The Tonic Request/Response Size Limit prevents data from being submitted to the da_light_node
Submitted on Mar 24th 2025 at 10:25:38 UTC by @zhaojie for Attackathon | Movement Labs
Report ID: #42495
Report Type: Blockchain/DLT
Report severity: High
Target: https://github.com/immunefi-team/attackathon-movement/tree/main/protocol-units/da/movement/protocol/light-node
Impacts:
Network not being able to confirm new transactions (total network shutdown)
Description
Brief/Intro
When the data size exceeds 4194304 bytes,da_light_node_client.batch_write failed. Data cannot be submitted to DA layer.
An attacker who creates 30 invalid transactions will exceed this limit.
Vulnerability Details
Because of the tonic request/response size limit, the da_light_node_client.batch_write function returns the following error when the submitted data size exceeds the limit:
batch_write: Err(Status { code: OutOfRange, message: "Error, decoded message length too large: found 5838150 bytes, the limit is: 4194304 bytes", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Mon, 24 Mar 2025 09:42:14 GMT", "content-length": "0"} }, source: None })This limit is easy to reach, aptos allows a single transaction size of up to 64kb, This limit is exceeded when the number of transactions is tested at 30.
Use the following code to add invalid data to the transaction:
The transactions created in this way in the test code can be processed, so the transactions are valid.
transaction_pipe::submit_transaction only verifies the validity of the transaction, it does not execute the transaction, and the transaction created by the attacker can pass the verification:
Therefore, when the size of the transaction data is close to 64kb and the number of concurrent transactions exceeds 30, the data will fail to be submitted.
transaction_pipe::submit_transaction does not return an error; the error occurs in transaction_ingress.rs.
In the test code, a simulated transaction is created, and the batch_write function is called by connecting the da light node directly. These transactions can also be submitted via aptos::rest_client.
Impact Details
The transaction cannot be processed due to a DoS attack, but the client still indicates that the transaction was submitted successfully.
References
https://github.com/immunefi-team/attackathon-movement/blob/a2790c6ac17b7cf02a69aea172c2b38d2be8ce00/networks/movement/movement-full-node/src/node/tasks/transaction_ingress.rs#L111
Proof of Concept
Proof of Concept
Place the test code in the following file: networks/movement/movement-client/src/bin/e2e/da_batch_write.rs
Adding dependencies and [bin] in: networks/movement/movement-client/Cargo.toml
To run the da light node server at 127.0.0.1:30730 :
Run tests:
Console output:
Was this helpful?