ETH Price: $3,304.27 (-2.31%)

Solidity Bug Info

Bug Name Description Severity
SignedImmutables
Immutable variables of signed integer type shorter than 256 bits can lead to values with invalid higher order bits if inline assembly is used.
When immutable variables of signed integer type shorter than 256 bits are read, their higher order bits were unconditionally set to zero. The correct operation would be to sign-extend the value, i.e. set the higher order bits to one if the sign bit is one. This sign-extension is performed by Solidity just prior to when it matters, i.e. when a value is stored in memory, when it is compared or when a division is performed. Because of that, to our knowledge, the only way to access the value in its unclean state is by reading it through inline assembly.

- Link: https://blog.soliditylang.org/2021/09/29/signed-immutables-bug/
- First Introduced: 0.6.5
- Fixed in Version: 0.8.9
- Published:
- Severity<: very low

very low