You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Description
This bug is caused by a lack of validation in function submitMessage to verify that the message.length of the submitted message is not 0 before accepting the message's submission and processing it. This allows empty and invalid messages to be submitted and processed as valid messages,
function submitMessage(
bytes32 destinationIdentifier,
bytes calldata destinationAddress,
bytes calldata message,
IncentiveDescription calldata incentive
) checkBytes65Address(destinationAddress) external payable returns(uint256 gasRefund, bytes32 messageIdentifier) {
if (incentive.refundGasTo == address(0)) revert RefundGasToIsZero();
// Check that the application has set a destination implementation
bytes memory destinationImplementation = implementationAddress[msg.sender][destinationIdentifier];
// Check that the length is not 0.
if (destinationImplementation.length == 0) revert NoImplementationAddressSet();
}
Attachments
Proof of Concept (PoC) File
Add this test to roundtrips.t.sol and run forge test.
Why should a message length of 0 not be allow? What if you just wanted to invoke a function on another contract? (or collect a piece of information of another chain to be sent back on ack?).
Github username: @Lightoasis
Twitter username: --
Submission hash (on-chain): 0x4db207640153cc1503b71d4356ffd08ae1d098f8338119b046bc93b854bcb89e
Severity: low
Description:
Description
This bug is caused by a lack of validation in function submitMessage to verify that the message.length of the submitted message is not 0 before accepting the message's submission and processing it. This allows empty and invalid messages to be submitted and processed as valid messages,
Attachments
Add this test to roundtrips.t.sol and run forge test.
Runnable file attached below.
Fix
Verify that the message.length != 0 before accepting the message's submission and proccessing it.
Files:
The text was updated successfully, but these errors were encountered: