Expired transactions prevent new submissions due to delayed garbage collection
The mempool's garbage collection runs only after a new transaction is submitted, so when the mempool is full with expired transactions, new submissions are rejected. An attacker could keep the mempool full and prevent legitimate transactions from being accepted until they are resubmitted.
Originally disclosed on Immunefi
- Disclosed after under an hour
#43221 [BC-Insight] Expired transactions prevent new submissions due to delayed garbage collection
Submitted on Apr 3rd 2025 at 19:46:19 UTC by @KlosMitSoss for Attackathon | Movement Labs
- Report ID: #43221
- Report Type: Blockchain/DLT
- Report severity: Insight
- Target: https://github.com/immunefi-team/attackathon-movement/tree/main/protocol-units/execution/maptos/opt-executor
- Impacts:
Description
Brief/Intro
A transaction cannot be submitted when the mempool is full. This remains true even if there are expired transactions that could be garbage collected since the transaction is initially submitted before the garbage collection process occurs.
Vulnerability Details
The garbage collection functions are called only after submit_transaction() is executed. Consequently, even when the mempool is full and contains expired transactions, the new transaction cannot be submitted.
As a result, the transaction must be resubmitted, despite the presence of expired transactions in the mempool. To address this issue, the garbage collection functions should be invoked at the start of the receive_transaction_tick() function.
Impact Details
A transaction cannot be submitted even when there are expired transactions in the mempool. As a result, the transaction needs to be submitted again.
References
Code references are provided throughout the report
Proof of Concept
Proof of Concept
- The mempool is full but there is at least one transaction that could be garbage collected.
- The transaction cannot be submitted since the mempool is full and
gc()is only called after the call tosubmit_transaction()(https://github.com/immunefi-team/attackathon-movement/blob/a2790c6ac17b7cf02a69aea172c2b38d2be8ce00/protocol-units/execution/maptos/opt-executor/src/background/transaction\\_pipe.rs#L140-L161). - The function needs to be called again to submit the transaction.
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 garbage collection function is called after the transaction submission check, so expired transactions are not removed before deciding if the mempool is full.
Impact
A transaction cannot be submitted even when there are expired transactions in the mempool, so it must be resubmitted.
What the attacker needed
Mempool is full; at least one expired transaction in mempool
The fix
The garbage collection functions should be invoked at the start of the `receive_transaction_tick()` function.
How it was found
- Fill the mempool so it is full but contains at least one expired transaction.
- Attempt to submit a new transaction; it is rejected because the mempool is full and garbage collection has not run yet.
- Resubmit the transaction after garbage collection has occurred.
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 mempool is a waiting area for transactions before they are processed. The system only cleans out expired transactions after trying to add a new one, so if the waiting area is full, new transactions are turned away even though some old ones could be removed. This means users have to try again later.
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.