Skip to content

Commit fa59a8d

Browse files
committed
typos, typos, typos
1 parent 82350e3 commit fa59a8d

9 files changed

+11
-11
lines changed

entries/SWC-105.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Unprotected Ether Withdrawal
88

99
Due to missing or insufficient access controls, malicious parties can withdraw some or all Ether from the contract account.
1010

11-
This bug is sometimes caused by unintentionally exposing initialization functions. By wrongly naming a function intended to be a constructor, the constructor code ends up in the runtime bytecode and can be called by anyone to re-initialize the contract.
11+
This bug is sometimes caused by unintentionally exposing initialization functions. By wrongly naming a function intended to be a constructor, the constructor code ends up in the runtime byte code and can be called by anyone to re-initialize the contract.
1212

1313
## Remediation
1414

entries/SWC-109.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Title
2-
Uninitialised Storage Pointer
2+
Uninitialized Storage Pointer
33

44
## Relationships
55
[CWE-824: Access of Uninitialized Pointer](https://cwe.mitre.org/data/definitions/824.html)
66

77
## Description
8-
Uninitialised local storage variables can point to other unexpected storage variables in the contract, leading to intentional or unintentional vulnerabilities.
8+
Uninitialized local storage variables can point to other unexpected storage variables in the contract, leading to intentional or unintentional vulnerabilities.
99

1010
## Remediation
1111
It is recommended to explicitly specify the data location `memory` or `storage` when dealing with complex types to ensure they behave as expected.

entries/SWC-112.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Calling into untrusted contracts is very dangerous, as the code at the target ad
1212

1313
## Remediation
1414

15-
Use `delegatecall` with caution and make sure to never call into untrusted contracts. If the target address is derived from user input enure to check it against a whitelist of trusted contracts.
15+
Use `delegatecall` with caution and make sure to never call into untrusted contracts. If the target address is derived from user input ensure to check it against a whitelist of trusted contracts.
1616

1717
## References
1818

entries/SWC-117.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Signature Malleability
66

77
## Description
88

9-
The implementation of a cryptographic signature system in Ethereum contracts often assumes that the signature is unique, but signatures can be altered without the possesion of the private key and still be valid. The EVM specification defines several so-called ‘precompiled’ contracts one of them being `ecrecover` which executes the elliptic curve public key recovery. A malicious user can slightly modify the three values _v_, _r_ and _s_ to create other valid signatures. A system that performs signature verification on contract level might be susceptible to attacks if the signature is part of the signed message hash. Valid signatures could be created by a malicious user to replay previously signed messages.
9+
The implementation of a cryptographic signature system in Ethereum contracts often assumes that the signature is unique, but signatures can be altered without the possession of the private key and still be valid. The EVM specification defines several so-called ‘precompiled’ contracts one of them being `ecrecover` which executes the elliptic curve public key recovery. A malicious user can slightly modify the three values _v_, _r_ and _s_ to create other valid signatures. A system that performs signature verification on contract level might be susceptible to attacks if the signature is part of the signed message hash. Valid signatures could be created by a malicious user to replay previously signed messages.
1010

1111
## Remediation
1212

entries/SWC-118.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This behavior sometimes leads to security issues, in particular when smart contr
1010

1111
## Remediation
1212

13-
Solidity version 0.4.22 introduces a new `constructor` keyword that make a contructor definitions clearer. It is therefore recommended to upgrade the contract to a recent version of the Solidity compiler and change to the new contructor declaration.
13+
Solidity version 0.4.22 introduces a new `constructor` keyword that make a constructor definitions clearer. It is therefore recommended to upgrade the contract to a recent version of the Solidity compiler and change to the new constructor declaration.
1414

1515
## References
1616

entries/SWC-120.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Weak Sources of Randomness
66

77
## Description
88

9-
Ability to generate random numbers is very helpful in all kinds of applications. One obvious example is gambling dapps, where pseudo-random number generator is used to pick the winner. However, creating a strong enough source of randomness in Ethereum is very challenging. For example, use of `block.timestamp` is insecure, as a miner can choose to provide any timestamp within a few seconds and still get his block accepted by others. Use of `blockhash`, `block.difficulty` and other fields is also insecure, as they're controlled by the miner. If the stakes are high, the miner can mine lots of blocks in a short time by renting hardware, pick the block that has required block hash for him to win, and drop all others.
9+
Ability to generate random numbers is very helpful in all kinds of applications. One obvious example is gambling DApps, where pseudo-random number generator is used to pick the winner. However, creating a strong enough source of randomness in Ethereum is very challenging. For example, use of `block.timestamp` is insecure, as a miner can choose to provide any timestamp within a few seconds and still get his block accepted by others. Use of `blockhash`, `block.difficulty` and other fields is also insecure, as they're controlled by the miner. If the stakes are high, the miner can mine lots of blocks in a short time by renting hardware, pick the block that has required block hash for him to win, and drop all others.
1010

1111
## Remediation
1212

entries/SWC-121.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Missing Protection against Signature Replay Attacks
66

77
## Description
88

9-
It is sometimes necessary to perform signature verification in smart contracts to achieve better useability or to save gas cost. A secure implementation needs to protect against Signature Replay Attacks by for example keeping track of all processed message hashes and only allowing new message hashes to be processed. A malicious user could attack a contract without such a control and get message hash that was sent by another user processed multiple times.
9+
It is sometimes necessary to perform signature verification in smart contracts to achieve better usability or to save gas cost. A secure implementation needs to protect against Signature Replay Attacks by for example keeping track of all processed message hashes and only allowing new message hashes to be processed. A malicious user could attack a contract without such a control and get message hash that was sent by another user processed multiple times.
1010

1111

1212
## Remediation

entries/SWC-122.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Improper Signature Verification
55
[CWE-347: Improper Verification of Cryptographic Signature](https://cwe.mitre.org/data/definitions/347.html)
66

77
## Description
8-
Many smart contract systems allow users to sign off-chain messages instead of directly requesting users to do an on-chain transaction. These systems usually assume that the message will be signed by the same address that owns the assets. However, one can hold assets directly in the regular account (controlled by a private key) or in a smart contract that acts as a wallet (e.g. a multisig contract). The current design of many smart contracts prevent contract based accounts from interacting with them, since contracts do not possess private keys and therefore can not directly sign messages. In order to solve the problem implementations that assume the validity of a signed message based on other methods that do not have that barrier. An example of such a method is to use `msg.sender` and assume if the message originated from the address then it is valid. This can lead to vulnerabilties especially in scenarios where proxies can be used to relay transactions.
8+
Many smart contract systems allow users to sign off-chain messages instead of directly requesting users to do an on-chain transaction. These systems usually assume that the message will be signed by the same address that owns the assets. However, one can hold assets directly in the regular account (controlled by a private key) or in a smart contract that acts as a wallet (e.g. a multisig contract). The current design of many smart contracts prevent contract based accounts from interacting with them, since contracts do not possess private keys and therefore can not directly sign messages. In order to solve the problem implementations that assume the validity of a signed message based on other methods that do not have that barrier. An example of such a method is to use `msg.sender` and assume if the message originated from the address then it is valid. This can lead to vulnerabilities especially in scenarios where proxies can be used to relay transactions.
99

1010

1111
## Remediation
1212

13-
It is not recommneded to use alternate verifcation schemes that do require proper signature verification through `ecrecover()`.
13+
It is not recommended to use alternate verification schemes that do require proper signature verification through `ecrecover()`.
1414

1515

1616
## References

entries/SWC-123.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Solidity `require()` construct is meant to validate external inputs of a fun
1414

1515
## Remediation
1616

17-
If the required logical condition is too strong, it should be weakend to allow all valid external inputs.
17+
If the required logical condition is too strong, it should be weakened to allow all valid external inputs.
1818

1919
Otherwise, the bug must be in the contract that provided the external input and one should consider fixing its code by making sure no invalid inputs are provided.
2020

0 commit comments

Comments
 (0)