Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Compiler Features:
* Standard JSON Interface: Introduce `settings.experimental` setting required for enabling the experimental mode.
* Yul EVM Code Transform: Improve stack shuffler performance by fixing a BFS deduplication issue.

Important Bugfixes:
* Code Generator: Fix unchecked multiplication overflow when computing storage slot offsets during element access on arrays whose base type is large enough for the product of the index and the storage size to overflow, which could silently read from or write to incorrect storage slots.
* Evmasm Code Generator: Fix unchecked multiplication overflow when computing the storage size of dynamic arrays during deletion, which could result in `delete` silently leaving stale data in storage.

Bugfixes:


Expand Down
10 changes: 10 additions & 0 deletions docs/bugs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"uid": "SOL-2026-2",
"name": "UncheckedArrayStorageSizeOverflow",
"summary": "Operations on storage arrays whose base type is large enough for the product of the element count or index and the storage size to overflow could silently corrupt storage due to unchecked multiplication overflow.",
"description": "When computing storage slot offsets for array operations, the code generators multiply a value (array length or element index) by the storage size of the base type. This multiplication was performed without an overflow check in several places, so when the product exceeded ``2**256``, the result would wrap to a smaller value. This affected two operations: (1) deleting a dynamic storage array (legacy code generator only, the IR code generator already used overflow-checked arithmetic for this), where the clearing loop would process fewer slots than necessary, leaving stale data in storage; (2) accessing an element by index (both code generators), where the access would silently read from or write to an incorrect storage slot, leading to data corruption. The bug required a dynamic storage array whose base type occupies enough slots for the relevant product to overflow (e.g., ``uint256[2**255][]`` where the base type occupies ``2**255`` slots). With the fix, both code generators now revert with an arithmetic overflow panic in these situations.",
"link": "",
"introduced": "0.1.0",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The oldest version I could test using Remix was v0.1.3+commit.028f561d, but the bug likely dates back to the introduction of convertLengthToSize in https://github.com/argotorg/solidity/pull/1/changes#diff-bda18cdea6a1adc5907560e2625cd6d135e40fe81a48d0d9e04978d5f0e0586eR626.

"fixed": "0.8.35",
"severity": "low"
},
{
"uid": "SOL-2026-1",
"name": "TransientStorageClearingHelperCollision",
Expand Down
Loading