Skip to content
DoS Audit finding Intermediate

Under normal usage of the blockchain, transactions will not be persisted

The transaction ingestion code spawns a background task to write a batch to the data availability layer, but if that write fails it only logs a warning and continues. An honest user's transaction can therefore be executed but never persisted, leading to loss of funds or chain availability issues.

br0nz3p1ck4x3 Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#43168 [BC-Insight] Under normal usage of the blockchain, transactions will not be persisted

Submitted on Apr 3rd 2025 at 07:02:33 UTC by @br0nz3p1ck4x3 for Attackathon | Movement Labs

Description

Description

Inside transaction_ingres::spawn_write_next_transaction_batch(), we find the following code:

Rust
if transactions.len() > 0 {
			info!(
				target: "movement_timing",
				batch_id = %batch_id,
				transaction_count = transactions.len(),
				"built_batch_write"
			);
			let batch_write = BatchWriteRequest { blobs: transactions };
			let mut buf = Vec::new();
			batch_write.encode_raw(&mut buf);
			info!("batch_write size: {}", buf.len());
			// spawn the actual batch write request in the background
			let mut da_light_node_client = self.da_light_node_client.clone();
			tokio::spawn(async move {
				match da_light_node_client.batch_write(batch_write.clone()).await {
					Ok(_) => {
						info!(
							target: "movement_timing",
							batch_id = %batch_id,
							"batch_write_success"
						);
						return;
					}
					Err(e) => {
						warn!("failed to write batch to DA: {:?} {:?}", e, batch_id);
					}
				}
			});
		}

		Ok(Continue(()))
	}

This function writes to the DA light node client. However, there is a bug in this functionality that will result in the so-called ghost transactions, transaction that were made by the end-user but ended up not being stored in any DB.

The issue lays here:

Rust
tokio::spawn(async move {
				match da_light_node_client.batch_write(batch_write.clone()).await {
					Ok(_) => {
						info!(
							target: "movement_timing",
							batch_id = %batch_id,
							"batch_write_success"
						);
						return;
					}
					Err(e) => {
						warn!("failed to write batch to DA: {:?} {:?}", e, batch_id);
					}
				}
			});
		}

		Ok(Continue(()))

If the writing fails and they return an Err, the only thing that will happen is that it will warn the operator with a warning message. After the warning message, Ok(Continue(())) will follow.

Impact

An honest user will make a transaction which will be successfully executed, however, this transaction will not be persisted to storage. The impact is diverse, it will lead to undefined behavior, could lead to loss of funds depending on the timing of this happening, availability of the chain.

Recommended Mitigation Steps

If persistence fails, either wait and retry or gracefully exit.

Proof of Concept

Proof of Concept

This proof of concept is very straight-forward, it does not even need a malicious actor. This issue will happen during normal usage of the blockchain, which makes the impact even more severe.

Step one: Alice, Bob and Charlie are having fun on Movement Network. They are preparing themselves for a hyped NFT drop on ClosedSea

Step two: Alice, Bob and Charlie both submit transactions with an immense amount of gas. On their end, this transaction was successful.

Step three: However, due to batch_write() returning an Err, nothing was persisted to the storage. There is no reference of Alice, Bob and Charlie ever making this transaction, which can lead to the impacts defined above.

The original report as published on Immunefi, by br0nz3p1ck4x3. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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

Likely the background write task ignores errors from the data availability write and the caller always returns success, so a failed persistence is never retried or surfaced.

Impact

An honest user's transaction can be executed but not persisted, which could lead to loss of funds depending on timing and affects chain availability.

What the attacker needed

Normal blockchain usage; no malicious actor needed

The fix

If persistence fails, the system should wait and retry or gracefully exit rather than continuing.

How it was found

  1. Users submit transactions with a large amount of gas.
  2. The transactions are accepted and appear successful to the users.
  3. The background batch write to the data availability layer returns an error.
  4. Only a warning is logged and nothing is persisted to storage.

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.

When you send a transaction, the system is supposed to save it permanently. Here, the saving step happens in the background, and if it fails the system just writes a warning in a log and carries on as if nothing happened. That means your transaction can appear to succeed but leave no permanent record.

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.

More by br0nz3p1ck4x3

View all

34 more disclosed reports, best first.

More from Movement Labs

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.