• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Regulation

Solidity Bugfix Release | Ethereum Foundation Blog

Moussa by Moussa
January 17, 2024
in Regulation
0
We are sunsetting Studio | Ethereum Foundation Blog
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


The latest version 0.4.25 release of Solidity fixes
two important bugs.
Another important bug has already been fixed in version 0.4.22 but it was only discovered recently that the bug existed.

Note that the Ethereum Foundation runs a bounty program for the code generator part of Solidity.

Cleanup of Exponent in Exponentiation

  • Likelihood of occurrence: very low
  • Exploitability: high
  • Discoverability by tests: low
  • Fixed in version: 0.4.25

Summary: Using short types in the exponent of an exponentiation operation can lead to invalid results.

The Solidity language allows integer types that are shorter than 256 bits, even though the Ethereum Virtual Machine
only knows types of exactly 256 bits. Because of that, higher order bits need to be set to zero from time to time.
For many operations, it is not relevant whether those bits are set to zero or not (addition is one example).
Because of that, the Solidity compiler delays this cleanup until it is needed in order to save gas.

In the very special circumstance that the exponent of the ** operator has a type that is shorter
than 256 bits, but not shorter than the type of the base and contains dirty higher order bits,
this can lead to an incorrect result. Note that literal exponents like in x ** 2 as well as
the case where the type of the base is uint256 or int256 are unaffected.

Note that a function parameter can have dirty higher order bits if called by a malicious entity,
and the same is true for data returned from functions of contracts deployed by malicious entities.

After having screened a large number of contracts, we deem this bug to affect only a very tiny number of
smart contracts, if any at all, because the regular uses of the exponentiation operator do not lead to the bug.

This bug was found by nweller.

Memory Corruption in Multi-Dimensional Array Decoder

  • Likelihood of occurrence: low
  • Exploitability: medium
  • Discoverability by tests: high
  • Introduced in version: 0.1.4
  • Fixed in version: 0.4.22

Summary: Calling functions of other contracts that return multi-dimensional fixed-size arrays results in memory corruption.

If Solidity code calls a function that returns a multi-dimensional fixed-size array,
the returned ABI-encoded data has to be converted to Solidity’s internal representation
of arrays. In Solidity, multi-dimensional arrays are implemented as arrays of
memory pointers, while in the ABI, the data is encoded inline.
The decoder did not take this difference into account with the result that the returned
elements are interpreted as memory pointers and thus can cause memory
corruption if the return values are accessed. Calling functions with multi-dimensional
fixed-size array arguments is unaffected as is returning fixed-size arrays from function calls
if they are not used in a Solidity contract.
The bug is only in the component that decodes a multi-dimensional fixed-size array
that is returned from a function call from Solidity.

This bug was found by jmahhh.

Invalid Encoding of Structs in Events

  • Likelihood of occurrence: low
  • Exploitability: low
  • Discoverability by tests: high
  • Introduced in version: 0.4.17
  • Fixed in version: 0.4.25

Summary: Structs as event parameters are not handled properly.

Structs were not meant to be supported as event parameters without the new ABI encoder.
The compiler did accept them nevertheless, but encoded their memory address instead of their actual value.
Even with the new ABI encoder, structs cannot be indexed event parameters.

Now, structs are properly disallowed for the old encoder and if they are indexed also for the new encoder.



Source link

Related articles

As quantum ‘Q-Day’ jumps to 2029, Ethereum faces a new fight over what to do with coins left in old wallets

As quantum ‘Q-Day’ jumps to 2029, Ethereum faces a new fight over what to do with coins left in old wallets

March 26, 2026
How L1 and L2s can build the strongest possible Ethereum

How L1 and L2s can build the strongest possible Ethereum

March 23, 2026
Share76Tweet47

Related Posts

As quantum ‘Q-Day’ jumps to 2029, Ethereum faces a new fight over what to do with coins left in old wallets

As quantum ‘Q-Day’ jumps to 2029, Ethereum faces a new fight over what to do with coins left in old wallets

by Moussa
March 26, 2026
0

The crypto industry has framed its quantum reckoning as a single catastrophic “Q-Day” moment when a sufficiently powerful machine arrives,...

How L1 and L2s can build the strongest possible Ethereum

How L1 and L2s can build the strongest possible Ethereum

by Moussa
March 23, 2026
0

The North Star of the Platform team is for Ethereum to scale as a cohesive system and enable confident adoption...

Ethereum gains ground over Bitcoin amid rising US-Iran war

Ethereum gains ground over Bitcoin amid rising US-Iran war

by Moussa
March 18, 2026
0

Ethereum is outpacing Bitcoin as tensions involving the United States, Israel, and Iran continue to shape global markets.Data from CryptoSlate...

The DAO dream is over? Billion dollar crypto company shuts down, kills token launch citing ‘no users’

The DAO dream is over? Billion dollar crypto company shuts down, kills token launch citing ‘no users’

by Moussa
March 18, 2026
0

Crypto governance company, Tally, processed more than $1 billion in payments, served more than a million users, helped secure over...

Miss this warning and you too could lose 99.9% in one swap while Ethereum bots walk away with the rest

Miss this warning and you too could lose 99.9% in one swap while Ethereum bots walk away with the rest

by Moussa
March 13, 2026
0

A crypto trader lost over $50 million in Aave-wrapped USDT on March 12 after sending a single large order through...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVs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wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News