Close Menu
    Trending
    • XRP Targets $6–$10 If Bitcoin Hits $144,000, Analyst Predicts
    • Ethereum ATH Above $4,800? Here’s How High It Will Go If 2021 Repeats
    • Little Pepe Presale Hits $8.8M as Meme Coin Mania Returns
    • Ripple (XRP) Rally Cools After Hitting $3.65—What’s Next?
    • Ethereum Set To Hit $10,000, Elliott Wave Analysis Predicts
    • Finland Joins The Bitcoin Conference Map With BTCHel
    • Binance Launches BNB Cryptoback Program with $150K Prize Pool
    • Proponent Suggests the XRP Price Can 6x From Here, But is it Realistic?
    Simon Crypto
    • Home
    • Crypto Market Trends
    • Bitcoin News
    • Crypto Mining
    • Cryptocurrency
    • Blockchain
    • More
      • Altcoins
      • Ethereum
    Simon Crypto
    Home»Ethereum»Security Alert – Solidity – Variables can be overwritten in storage
    Ethereum

    Security Alert – Solidity – Variables can be overwritten in storage

    Team_SimonCryptoBy Team_SimonCryptoFebruary 4, 2025No Comments2 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email


    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 might be smaller than 256 bits are packed collectively into the identical 256 bit slot if they’ll 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 might be modified. Creating an overflow within the first variable is feasible utilizing arithmetics or by straight passing in a price from the decision knowledge (values in name knowledge are aligned to 32 bytes, and padding is neither verified nor enforced).

    Contracts that solely use the categories listed under 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 might be by no means subsequent to one another (be aware that state variables of base contracts are “pulled in”) are not affected.

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

    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 is just not a signed integer and never of bytesNN kind.

    Varieties smaller than 256 bits embody:
    bool, enums, uint8, …, uint248, int8, …, int248, deal with, any contract kind

    Advisable motion:

    • Recompile contracts that haven’t but been deployed utilizing a minimum of 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

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Ethereum ATH Above $4,800? Here’s How High It Will Go If 2021 Repeats

    July 21, 2025

    Traders are bullish on ETH as price begins to catch up with the tech

    July 19, 2025

    Volume 50% Higher Than BTC’s

    July 19, 2025

    Massive Ethereum Accumulation: Bit Digital Crosses 120,000 ETH With Latest Buy

    July 19, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Categories
    • Altcoins
    • Bitcoin News
    • Blockchain
    • Crypto Market Trends
    • Crypto Mining
    • Cryptocurrency
    • Ethereum
    Archives
    • July 2025
    • June 2025
    • May 2025
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    Archives
    • July 2025
    • June 2025
    • May 2025
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    Top Posts

    Shiba Inu Could Increase 75% If It Holds Current Level – Analyst Shares Price Target

    November 30, 2024

    ad

    About us

    Welcome to SimonCrypto.in, your ultimate destination for everything crypto! Whether you’re a seasoned investor, a blockchain enthusiast, or just beginning your journey into the fascinating world of cryptocurrencies, we’re here to guide you every step of the way.

    At SimonCrypto.in, we are passionate about demystifying the complex world of digital currencies and blockchain technology. Our mission is to provide insightful, accurate, and up-to-date information to empower our readers to make informed decisions in the ever-evolving crypto space.

    Top Insights

    Savvy Mining Teacher Your How to Earn $28,700 Daily.

    April 17, 2025

    C++ DEV Update: Announcing Remix

    February 9, 2025

    Crypto Bloodbath: Over $1 Billion Liquidated As Iran-Israel Tensions Erupt

    June 13, 2025
    Categories
    • Altcoins
    • Bitcoin News
    • Blockchain
    • Crypto Market Trends
    • Crypto Mining
    • Cryptocurrency
    • Ethereum
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 SimonCrypto All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.