Vulnerability related to ‘Optimizer Bug Regarding Memory Side Effects of Inline Assembly’
Summary
Solidity versions 0.8.13 and 0.8.14 are vulnerable to a recently reported optimizer bug related to inline assembly. Solidity 0.8.15 has been released with a fix.
Vulnerability Detail
AutoRoller.sol inherits solidity contracts from solmate FixedPointMathLib and ERC4626 , and both these uses inline assembly, and optimization is enabled while compiling.
Impact
This bug only occurs under very specific conditions: the legacy optimizer must be enabled rather than the IR pipeline (true for the current project configuration), and the affected assembly blocks must not refer to any local Solidity variables.
0xSmartContract
medium
Vulnerability related to ‘Optimizer Bug Regarding Memory Side Effects of Inline Assembly’
Summary
Solidity versions 0.8.13 and 0.8.14 are vulnerable to a recently reported optimizer bug related to inline assembly. Solidity 0.8.15 has been released with a fix.
Vulnerability Detail
AutoRoller.sol inherits solidity contracts from solmate FixedPointMathLib and ERC4626 , and both these uses inline assembly, and optimization is enabled while compiling.
Impact
This bug only occurs under very specific conditions: the legacy optimizer must be enabled rather than the IR pipeline (true for the current project configuration), and the affected assembly blocks must not refer to any local Solidity variables.
Code Snippet
AutoRoller.sol#L5
AutoRoller.sol#L7
FixedPointMathLib.sol#L36-L51
Tool used
Manual Review
Recommendation
Use recent Solidity version 0.8.15 which has the fix for these issues.