-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ contract FraudProofRouter is GasRouter { | |
// The AttributeCheckpointFraud contract to obtain the attributions from | ||
AttributeCheckpointFraud public immutable attributeCheckpointFraud; | ||
|
||
// Mapping to store the fraud attributions for a given origin, signer, merkle tree, and digest for easy access for client contracts to aide slashing | ||
mapping(uint32 origin => mapping(address signer => mapping(bytes32 merkleTree => mapping(bytes32 digest => Attribution)))) | ||
// Mapping to store the fraud attributions for a given origin, signer, and digest for easy access for client contracts to aide slashing | ||
mapping(uint32 origin => mapping(address signer => mapping(bytes32 digest => Attribution))) | ||
Check warning Code scanning / Olympix Integrated Security Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables
|
||
public fraudAttributions; | ||
|
||
// ===================== Events ======================= | ||
|
@@ -74,13 +74,11 @@ contract FraudProofRouter is GasRouter { | |
* @notice Sends a fraud proof attribution. | ||
* @param _signer The address of the signer attributed with fraud. | ||
* @param _digest The digest associated with the fraud. | ||
* @param _merkleTree The merkle tree associated with the fraud. | ||
* @return The message ID of the sent fraud proof. | ||
*/ | ||
function sendFraudProof( | ||
Check failure Code scanning / Olympix Integrated Security Modifying state after making an external call may allow for reentrancy attacks. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/reentrancy Critical
Modifying state after making an external call may allow for reentrancy attacks. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/reentrancy
Check notice Code scanning / Olympix Integrated Security Reentrant functions which emit events after making an external call may lead to out-of-order events. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/reentrancy-events Low
Reentrant functions which emit events after making an external call may lead to out-of-order events. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/reentrancy-events
|
||
uint32 _destination, | ||
address _signer, | ||
bytes32 _merkleTree, | ||
bytes32 _digest | ||
) external returns (bytes32) { | ||
Attribution memory attribution = attributeCheckpointFraud.attributions( | ||
|
@@ -91,17 +89,14 @@ contract FraudProofRouter is GasRouter { | |
require(attribution.timestamp != 0, "Attribution does not exist"); | ||
Check warning Code scanning / Olympix Integrated Security Test functions fail to verify specific revert reasons, potentially missing important contract behavior validation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-revert-reason-tests Medium
Test functions fail to verify specific revert reasons, potentially missing important contract behavior validation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-revert-reason-tests
|
||
|
||
if (_destination == mailbox.localDomain()) { | ||
fraudAttributions[_destination][_signer][_merkleTree][ | ||
_digest | ||
] = attribution; | ||
fraudAttributions[_destination][_signer][_digest] = attribution; | ||
|
||
emit LocalFraudProofReceived(_signer, _digest, attribution); | ||
|
||
return bytes32(0); | ||
} else { | ||
bytes memory encodedMessage = FraudMessage.encode( | ||
_signer, | ||
_merkleTree, | ||
_digest, | ||
attribution | ||
); | ||
|
@@ -132,12 +127,11 @@ contract FraudProofRouter is GasRouter { | |
) internal override { | ||
( | ||
address signer, | ||
Check notice Code scanning / Olympix Integrated Security Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables Low
Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables
|
||
bytes32 merkleTree, | ||
bytes32 digest, | ||
Check notice Code scanning / Olympix Integrated Security Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables Low
Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables
|
||
Attribution memory attribution | ||
Check notice Code scanning / Olympix Integrated Security Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables Low
Local variables in test functions are not properly fuzzed, potentially reducing the effectiveness of property-based testing. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-local-variables
|
||
) = FraudMessage.decode(_message); | ||
|
||
fraudAttributions[_origin][signer][merkleTree][digest] = attribution; | ||
fraudAttributions[_origin][signer][digest] = attribution; | ||
|
||
emit FraudProofReceived(_origin, signer, digest, attribution); | ||
} | ||
|