Friday, November 28, 2025
SCRYPTO MAGAZINE
No Result
View All Result
  • Home
  • Crypto
  • Bitcoin
  • Blockchain
  • Market
  • Ethereum
  • Altcoins
  • XRP
  • Dogecoin
  • NFTs
  • Regualtions
SCRYPTO MAGAZINE
No Result
View All Result
Home Ethereum

Solidity Storage Array Bugs | Ethereum Foundation Blog

SCRYPTO MAGAZINE by SCRYPTO MAGAZINE
November 28, 2025
in Ethereum
0
The ETH Rangers Program | Ethereum Foundation Blog
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter

Related articles

Ethereum ETFs pull $175mln in two days, yet ETH stays weak — What’s wrong?

Ethereum ETFs pull $175mln in two days, yet ETH stays weak — What’s wrong?

November 27, 2025
Ethereum Steadies Near $2,900 as Fed Rate-Cut Odds Fuel $3,400 Rebound Hopes

Ethereum Steadies Near $2,900 as Fed Rate-Cut Odds Fuel $3,400 Rebound Hopes

November 27, 2025


Solidity Storage Array Bug Announcement

This weblog publish is about two bugs related to storage arrays that are in any other case unrelated. Each have been current within the compiler for a very long time and have solely been found now regardless that a contract containing them ought to very seemingly present malfunctions in assessments.

Daenam Kim with assist from Nguyen Pham, each from Curvegrid found a difficulty the place invalid knowledge is saved in reference to arrays of signed integers.

This bug has been current since Solidity 0.4.7 and we think about it the extra critical of the 2. If these arrays use damaging integers in a sure scenario, it’s going to trigger knowledge corruption and thus the bug needs to be straightforward to detect.

By the Ethereum bug bounty program, we acquired a report a couple of flaw inside the new experimental ABI encoder (known as ABIEncoderV2). The brand new ABI encoder continues to be marked as experimental, however we nonetheless suppose that this deserves a distinguished announcement since it’s already used on mainnet.
Credit to Ming Chuan Lin (of https://www.secondstate.io) for each discovering and fixing the bug!

The 0.5.10 release incorporates the fixes to the bugs.
For the time being, we don’t plan to publish a repair to the legacy 0.4.x sequence of Solidity, however we’d if there’s well-liked demand.

Each bugs needs to be simply seen in assessments that contact the related code paths.

Particulars in regards to the two bugs could be discovered beneath.

Signed Integer Array Bug

Who needs to be involved

When you have deployed contracts which use signed integer arrays in storage and both straight assign

  • a literal array with at the very least one damaging worth in it (x = [-1, -2, -3];) or
  • an present array of a totally different signed integer kind

to it, it will result in knowledge corruption within the storage array.

Contracts that solely assign particular person array parts (i.e. with x[2] = -1;) aren’t affected.

How one can verify if contract is susceptible

When you use signed integer arrays in storage, attempt to run assessments the place you utilize damaging values. The impact needs to be that the precise worth saved is optimistic as an alternative of damaging.

When you have a contract that meets these situations, and wish to confirm whether or not the contract is certainly susceptible, you possibly can attain out to us by way of security@ethereum.org.

Technical particulars

Storage arrays could be assigned from arrays of various kind. Throughout this copy and project operation, a sort conversion is carried out on every of the weather. Along with the conversion, particularly if the signed integer kind is shorter than 256 bits, sure bits of the worth should be zeroed out in preparation for storing a number of values in the identical storage slot.

Which bits to zero out was incorrectly decided from the supply and never the goal kind. This results in too many bits being zeroed out. Specifically, the signal bit will likely be zero which makes the worth optimistic.

ABIEncoderV2 Array Bug

Who needs to be involved

When you have deployed contracts which use the experimental ABI encoder V2, then these is likely to be affected. Which means solely contracts which use the next directive inside the supply code could be affected:

pragma experimental ABIEncoderV2;

Moreover, there are a selection of necessities for the bug to set off. See technical particulars additional beneath for extra data.

How one can verify if contract is susceptible

The bug solely manifests itself when all the following situations are met:

  • Storage knowledge involving arrays or structs is distributed on to an exterior perform name, to abi.encode or to occasion knowledge with out prior project to an area (reminiscence) variable AND
  • this knowledge both incorporates an array of structs or an array of statically-sized arrays (i.e. at the very least two-dimensional).

Along with that, within the following scenario, your code is NOT affected:

  • in case you solely return such knowledge and don’t use it in abi.encode, exterior calls or occasion knowledge.

Attainable penalties

Naturally, any bug can have wildly various penalties relying on this system management circulation, however we anticipate that that is extra prone to result in malfunction than exploitability.

The bug, when triggered, will beneath sure circumstances ship corrupt parameters on methodology invocations to different contracts.

Technical particulars

Throughout the encoding course of, the experimental ABI encoder doesn’t correctly advance to the subsequent aspect in an array in case the weather occupy greater than a single slot in storage.

That is solely the case for parts which are structs or statically-sized arrays. Arrays of dynamically-sized arrays or of elementary datatypes aren’t affected.

The precise impact you will note is that knowledge is “shifted” within the encoded array: When you have an array of kind uint[2][] and it incorporates the information
[[1, 2], [3, 4], [5, 6]], then it is going to be encoded as [[1, 2], [2, 3], [3, 4]] as a result of the encoder solely advances by a single slot between parts as an alternative of two.

This publish was collectively composed by @axic, @chriseth, @holiman



Source link

Tags: ArrayBlogBugsEthereumFoundationSolidityStorage
Share76Tweet47

Related Posts

Ethereum ETFs pull $175mln in two days, yet ETH stays weak — What’s wrong?

Ethereum ETFs pull $175mln in two days, yet ETH stays weak — What’s wrong?

by SCRYPTO MAGAZINE
November 27, 2025
0

Key Takeaways How a lot cash flowed into Ethereum ETFs lately? On 24 November, ETH ETFs noticed $96.6 million in...

Ethereum Steadies Near $2,900 as Fed Rate-Cut Odds Fuel $3,400 Rebound Hopes

Ethereum Steadies Near $2,900 as Fed Rate-Cut Odds Fuel $3,400 Rebound Hopes

by SCRYPTO MAGAZINE
November 27, 2025
0

Ethereum (ETH) is holding agency across the $2,900 stage as enhancing macro sentiment, renewed whale accumulation, and rising ETF inflows...

Ethereum Founder Buterin Warns Of New X Feature: Here’s Why

Ethereum Founder Buterin Warns Of New X Feature: Here’s Why

by SCRYPTO MAGAZINE
November 27, 2025
0

Trusted Editorial content material, reviewed by main trade consultants and seasoned editors. Ad Disclosure Ethereum co-founder Vitalik Buterin is sounding...

The ETH Rangers Program | Ethereum Foundation Blog

Geth v1.9.0 | Ethereum Foundation Blog

by SCRYPTO MAGAZINE
November 27, 2025
0

After many months of silence, we're proud to announce the v1.9.0 launch of Go Ethereum! Though this launch has been...

Institutional investors pull $1.94B from Bitcoin, crypto funds – But relief may be near

Institutional investors pull $1.94B from Bitcoin, crypto funds – But relief may be near

by SCRYPTO MAGAZINE
November 26, 2025
0

Journalist Posted: November 26, 2025 Key Takeaways Did institutional crypto funds pull again final week? Traders withdrew $1.94B from digital...

Load More
  • Trending
  • Comments
  • Latest
Analysts’ 2025 Bull Market Predictions

Bitcoin Entering Second ‘Price Discovery Uptrend’, What’s Ahead?

January 21, 2025
Bitcoin Spot-Perpetual Price Gap Turns Negative

Bitcoin Spot-Perpetual Price Gap Turns Negative

December 23, 2024
Bitcoin Price Flashes Major Buy Signal On The 4-Hour TD Sequential Chart, Where To Enter?

Bitcoin Price Flashes Major Buy Signal On The 4-Hour TD Sequential Chart, Where To Enter?

December 24, 2024
Cardano Price Outlook: The $0.40 Threshold Could Unlock Doors to $1

Cardano Price Outlook: The $0.40 Threshold Could Unlock Doors to $1

December 23, 2024
Bitcoin could reach this unbelievable price by 2025, but these factors must align

Bitcoin could reach this unbelievable price by 2025, but these factors must align

0
XRP Consolidation Could End Once It Clears $2.60 – Top Analyst Expects $4 Soon

XRP Consolidation Could End Once It Clears $2.60 – Top Analyst Expects $4 Soon

0

Fed Can’t Hold Bitcoin, No Plans Yet To Change Law, Powell Says

0
Bears Take Full Control of the Market

Bears Take Full Control of the Market

0
The ETH Rangers Program | Ethereum Foundation Blog

Solidity Storage Array Bugs | Ethereum Foundation Blog

November 28, 2025
Analyst Predicts XRP Price Will Hit $100 Before Bitcoin Hits $1 Million

Analyst Predicts XRP Price Will Hit $100 Before Bitcoin Hits $1 Million

November 28, 2025
I found the best Chromebook deals for Black Friday 2025 – here are the 20 worth buying now

I found the best Chromebook deals for Black Friday 2025 – here are the 20 worth buying now

November 28, 2025
Do Kwon Could Change Plea In Criminal Case At Aug. 12 Conference

Do Kwon Seeks Five-Year US Sentence Over TerraUSD Collapse

November 28, 2025

Recent News

The ETH Rangers Program | Ethereum Foundation Blog

Solidity Storage Array Bugs | Ethereum Foundation Blog

November 28, 2025
Analyst Predicts XRP Price Will Hit $100 Before Bitcoin Hits $1 Million

Analyst Predicts XRP Price Will Hit $100 Before Bitcoin Hits $1 Million

November 28, 2025

Categories

  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Dogecoin
  • Ethereum
  • Market
  • NFTs
  • Regualtions
  • XRP

Recommended

  • Solidity Storage Array Bugs | Ethereum Foundation Blog
  • Analyst Predicts XRP Price Will Hit $100 Before Bitcoin Hits $1 Million
  • I found the best Chromebook deals for Black Friday 2025 – here are the 20 worth buying now
  • Do Kwon Seeks Five-Year US Sentence Over TerraUSD Collapse
  • Bitcoin Whales Could Drive Prices Down Further, Experts Warn

© 2025 SCRYPTO MAGAZINE | All Rights Reserved

No Result
View All Result
  • Home
  • Crypto
  • Bitcoin
  • Blockchain
  • Market
  • Ethereum
  • Altcoins
  • XRP
  • Dogecoin
  • NFTs
  • Regualtions

© 2025 SCRYPTO MAGAZINE | All Rights Reserved