Sunday, August 10, 2025
Bitcoin In Stock
Shop
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoin
  • DeFi
  • More
    • Ethereum
    • Dogecoin
    • XRP
    • NFTs
    • Regulations
  • Shop
    • Bitcoin Book
    • Bitcoin Coin
    • Bitcoin Hat
    • Bitcoin Merch
    • Bitcoin Miner
    • Bitcoin Miner Machine
    • Bitcoin Shirt
    • Bitcoin Standard
    • Bitcoin Wallet
Bitcoin In Stock
No Result
View All Result
Home Ethereum

Security Alert – Solidity – Variables can be overwritten in storage

n70products by n70products
August 9, 2025
in Ethereum
0
Security Alert – Solidity – Variables can be overwritten in storage
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


Abstract: In some conditions, variables can overwrite different variables in storage.

Affected Solidity compiler variations: 0.1.6 to 0.4.3 (together with 0.4.4 pre-release variations)

Detailed description:

Storage variables which are smaller than 256 bits are packed collectively into the identical 256 bit slot if they will match. If a price bigger than what’s allowed by the kind is assigned to the primary variable, that worth will overwrite the second variable.

This implies if an attacker could cause an overflow within the worth of the primary variable, then the second variable may be modified. Creating an overflow within the first variable is feasible utilizing arithmetics or by instantly passing in a price from the decision information (values in name information are aligned to 32 bytes, and padding is neither verified nor enforced).

Contracts that solely use the categories listed beneath for state variables are not affected. Arrays, mappings and structs (based mostly on these following varieties) are additionally not affected:

  • signed integers, together with sizes smaller than 256 bits
  • bytesNN varieties, together with sizes smaller than 256 bits
  • unsigned integers (uint) of 256 bits

Contracts with varieties smaller than 256 bits which are by no means subsequent to one another (observe that state variables of base contracts are “pulled in”) are not affected.

The Ethereum multisignature pockets contract is not affected.
Observe that addresses take up 160 bits, so contracts that solely use addresses and 256-bit varieties are secure. Moreover, addresses and booleans are nearly by no means manipulated by way of arithmetic operations in apply, so contracts utilizing solely addresses, booleans and 256 bit varieties must also be secure.

The next contracts could also be affected:
Contracts containing two or extra contiguous state variables the place the sum of their sizes is lower than 256 bits and the primary state variable isn’t a signed integer and never of bytesNN sort.

Sorts smaller than 256 bits embody:
bool, enums, uint8, …, uint248, int8, …, int248, handle, any contract sort

Beneficial motion:

  • Recompile contracts that haven’t but been deployed utilizing no less than Solidity launch 0.4.4 (not the pre-release or nightly model).
  • Deactivate, take away funds from, or improve already deployed contracts.

This vulnerability was discovered by [github.com/catageek](https://github.com/catageek): [https://github.com/ethereum/solidity/issues/1306](https://github.com/ethereum/solidity/points/1306)



Source link

Tags: AlertoverwrittensecuritySoliditystorageVariables
  • Trending
  • Comments
  • Latest
Everything announced at Meta Connect 2024: $299 Quest 3S, Orion AR glasses, and more

Everything announced at Meta Connect 2024: $299 Quest 3S, Orion AR glasses, and more

September 25, 2024
Ethereum turns deflationary: What it means for ETH prices in 2025

Ethereum turns deflationary: What it means for ETH prices in 2025

October 18, 2024
Ethereum Price Could Still Reclaim $4,000 Based On This Bullish Divergence

Ethereum Price Could Still Reclaim $4,000 Based On This Bullish Divergence

February 23, 2025
Uniswap Launches New Bridge Connecting DEX to Base, World Chain, Arbitrum and Others

Uniswap Launches New Bridge Connecting DEX to Base, World Chain, Arbitrum and Others

October 24, 2024
Making the case for Litecoin’s breakout before Bitcoin’s halving

Making the case for Litecoin’s breakout before Bitcoin’s halving

0
Rocket Pool Stands To Reap Big From Ethereum’s Dencun Upgrade, RPL Flying

Rocket Pool Stands To Reap Big From Ethereum’s Dencun Upgrade, RPL Flying

0
24 Crypto Terms You Should Know

24 Crypto Terms You Should Know

0
Shibarium Breaks The Internet (Again) With Over 400 Million Layer-2 Transactions

Shibarium Breaks The Internet (Again) With Over 400 Million Layer-2 Transactions

0
I changed these 6 settings on my iPad to significantly improve its battery life

I changed these 6 settings on my iPad to significantly improve its battery life

August 10, 2025
Bitcoin or Ethereum? – Why Peter Schiff’s pick may surprise you

Bitcoin or Ethereum? – Why Peter Schiff’s pick may surprise you

August 10, 2025
I compared the best headphones from Apple, Sony, Bose, and Sonos: Here’s how the AirPods Max wins

I compared the best headphones from Apple, Sony, Bose, and Sonos: Here’s how the AirPods Max wins

August 10, 2025
Ukraine to Weigh Bill Legalizing Crypto in Late August

Ukraine to Weigh Bill Legalizing Crypto in Late August

August 10, 2025

Recent News

I changed these 6 settings on my iPad to significantly improve its battery life

I changed these 6 settings on my iPad to significantly improve its battery life

August 10, 2025
Bitcoin or Ethereum? – Why Peter Schiff’s pick may surprise you

Bitcoin or Ethereum? – Why Peter Schiff’s pick may surprise you

August 10, 2025

Categories

  • Altcoin
  • Bitcoin
  • Blockchain
  • Blog
  • Cryptocurrency
  • DeFi
  • Dogecoin
  • Ethereum
  • Market & Analysis
  • NFTs
  • Regulations
  • XRP

Recommended

  • I changed these 6 settings on my iPad to significantly improve its battery life
  • Bitcoin or Ethereum? – Why Peter Schiff’s pick may surprise you
  • I compared the best headphones from Apple, Sony, Bose, and Sonos: Here’s how the AirPods Max wins

© 2024 Bitcoin In Stock | All Rights Reserved

No Result
View All Result
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoin
  • DeFi
  • More
    • Ethereum
    • Dogecoin
    • XRP
    • NFTs
    • Regulations
  • Shop
    • Bitcoin Book
    • Bitcoin Coin
    • Bitcoin Hat
    • Bitcoin Merch
    • Bitcoin Miner
    • Bitcoin Miner Machine
    • Bitcoin Shirt
    • Bitcoin Standard
    • Bitcoin Wallet

© 2024 Bitcoin In Stock | All Rights Reserved

Go to mobile version