Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.42 KB

Unspecific compiler version pragma.md

File metadata and controls

31 lines (24 loc) · 1.42 KB

For most source-units the compiler version pragma is very unspecific ^0.6.0.

While this often makes sense for libraries to allow them to be included with multiple different versions of an application, it may be a security risk for the actual application implementation itself.

A known vulnerable compiler version may accidentally be selected or security tools might fall-back to an older compiler version ending up actually checking a different evm compilation that is ultimately deployed on the blockchain.

Recommendation:

Avoid floating pragmas.

We highly recommend pinning a concrete compiler version (latest without security issues) in at least the top-level "deployed" contracts to make it unambiguous which compiler version is being used.

Rule of thumb: a flattened source-unit should have at least one non-floating concrete solidity compiler version pragma.


Slide Screenshot

115.jpg


Slide Text

  • ConsenSys Audit 1inch Finding 4.6
  • Configuration
  • Floating/Unlocked Solidity Compiler Pragma
  • Fixed Pragma
  • Recommended Version

References


Tags