CVE-2023-45130 Frontier opcode SUICIDE touches too many storage values on large contracts
Attackers can stall Substrate parachains by crafting contracts that exceed Proof-of-Validity size limits during self-destruct operations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2023-45130?
CVE-2023-45130 is a high-severity denial of service vulnerability in paritytech frontier, published on 13 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Frontier is Substrate's Ethereum compatibility layer. Prior to commit aea528198b3b226e0d20cce878551fd4c0e3d5d0, at the end of a contract execution, when opcode SUICIDE marks a contract to be deleted, the software uses `storage::remove_prefix` (now renamed to `storage::clear_prefix`) to remove all storages associated with it. This is a single IO primitive call passing the WebAssembly boundary. For large contracts, the call (without providing a `limit` parameter) can be slow. In addition, for parachains, all storages to be deleted will be part of the PoV, which easily exceed relay chain PoV size limit. On the other hand, Frontier's maintainers only charge a fixed cost for opcode SUICIDE. The maintainers consider the severity of this issue high, because an attacker can craft a contract with a lot of storage values on a parachain, and then call opcode SUICIDE on the contract. If the transaction makes into a parachain block, the parachain will then stall because the PoV size will exceed relay chain's limit. This is especially an issue for XCM transactions, because they can't be skipped. Commit aea528198b3b226e0d20cce878551fd4c0e3d5d0 contains a patch for this issue. For parachains, it's recommended to issue an emergency runtime upgrade as soon as possible. For standalone chains, the impact is less severe because the issue mainly affects PoV sizes. It's recommended to issue a normal runtime upgrade as soon as possible. There are no known workarounds.
Weakness: CWE-770
Which versions are affected by CVE-2023-45130?
It affects 1 product.
Products include Parity Frontier.
How do I fix CVE-2023-45130?
No fix has been published for CVE-2023-45130 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2023-45130 being exploited?
There is no known exploitation of CVE-2023-45130 in the wild and no public exploit code.
Other vulnerabilities in paritytech frontier
- CVE-2023-28431 Frontier's modexp precompile is slow for even modulus
- CVE-2022-36008 Message length overflow in frontier
- CVE-2022-21685 Integer underflow in Frontier
- CVE-2022-39242 Incorrect Calculation in Frontier leads to inflated Ethereum chain gas prices
- CVE-2022-31111 Discrepency in transfer value and actual value due to incorrect truncation in Frontier
Sources
Also known as GHSA-gc88-2gvv-gp3v.