The LayerZero requires a certain amount of fees to be provided in order to successfully execute the transaction. But some functions don't check if a sufficient amount of fee has been provided.
In LayerZero, the destination chain's function call requires a specific gas amount. If the desired gas amount is not provided, it will revert with an out-of-gas exception. The TempleGold::send
function relies on the responsibility of the user to ensure that appropriate fees are established.
There is a function TempleTeleporter::quote
that the user can call to calculate the fee. But actually the user can pass arbitrary value for the fee in the TempleGold::send
function. There is no check in the function that ensures the user has provided the sufficient amount for the fee for properly execution of the send
function.
There is the same problem in TempleTeleporter::teleport
function:
The function requires enough msg.value
to be sent to cover completing execution and the transfer by endpoint and on the destination chain. But the function doesn't check if enough msg.value
is actually send. It relies on the responsibility of the user.
The malicious user can constantly call the TempleGold::send
or TempleTeleporter::teleport
function with a small amount of fee and the functions will always revert due to out of gas error. In that way the attacker can block the communication between the source and the destination chain.
Manual Review
Add a check to ensure that the user has provided the minimum amount value for the fee.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.