Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of floating pragma statement #1

Closed
code423n4 opened this issue Jan 6, 2022 · 1 comment
Closed

Use of floating pragma statement #1

code423n4 opened this issue Jan 6, 2022 · 1 comment
Assignees
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") sponsor vault Vault

Comments

@code423n4
Copy link
Contributor

Handle

jayjonah8

Vulnerability details

Impact

In Vault.sol as well as other files, floating pragmas are used. Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Proof of Concept

https://swcregistry.io/docs/SWC-103

https://github.com/code-423n4/2022-01-sandclock/blob/main/sandclock/contracts/Vault.sol#L2

Tools Used

Manual code review

Recommended Mitigation Steps

change pragma statements from: "pragma solidity ^0.8.10;" to "pragma solidity 0.8.10;"

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Jan 6, 2022
code423n4 added a commit that referenced this issue Jan 6, 2022
@r2moon r2moon added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Jan 7, 2022
@naps62 naps62 closed this as completed Jan 12, 2022
@naps62 naps62 added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label Jan 12, 2022
@CloudEllie CloudEllie reopened this Jan 31, 2022
@naps62
Copy link
Collaborator

naps62 commented Feb 16, 2022

already fixed

@naps62 naps62 closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") sponsor vault Vault
Projects
None yet
Development

No branches or pull requests

5 participants