Open hats-bug-reporter[bot] opened 3 months ago
@party-for-illuminati ,Could you please provide more details or clarification on why it was deemed invalid?
@party-for-illuminati ,Could you please provide more details or clarification on why it was deemed invalid?
hey @party-for-illuminati ,as i mentioned
The function proceeds to create a refuel transaction for outboundTransactions[0]
here the outboundTransactions[0]
will not revert and the check require(outboundTx.txHash != bytes32(0) && outboundTx.finalisedCandidateHash == bytes32(0), "UOT");
passes as the outboundTransactions[0]
will have valid outboundTx.txHash
and outboundTx.finalisedCandidateHash
can u please verify the same?
hey @party-for-illuminati ,as i mentioned
The function proceeds to create a refuel transaction for outboundTransactions[0]
here the
outboundTransactions[0]
will not revert and the checkrequire(outboundTx.txHash != bytes32(0) && outboundTx.finalisedCandidateHash == bytes32(0), "UOT");
passes as theoutboundTransactions[0]
will have validoutboundTx.txHash
andoutboundTx.finalisedCandidateHash
can u please verify the same?
It won't break anything if you create a refuel serializer for an outgoing transaction that is already mined. If you have found that it is possible please provide a PoC
Also keep in mind that it checks that finalisedCandidateHash == 0, which is impossible for finished transactions
ok,let me look into it..
Github username: -- Twitter username: -- Submission hash (on-chain): 0x1b9d12ee2601b29baa0afb534b34ca67084bbec95a6d8e62978c1db38e2d62fc Severity: medium
Description: Description\ In the
startRefuelTxSerializing
andfinaliseRefuelTxSerializing
functions of theVaultBitcoinWallet
contract, there is no proper verification of theoutgoingTxHash
. If the providedoutgoingTxHash
is not present in the_outboundTxHashToId
mapping, it defaults to returningzero
. This can lead to the creation of a refuel transaction foroutboundTransactions[0]
, which isincorrect
and can cause unintended behavior. The same issue is present in thefinaliseRefuelTxSerializing
function too.Attack Scenario\
Assume there are no outbound transactions with the hash 0xabc123....
relayer calls the startRefuelTxSerializing function with the hash 0xabc123....
The _outboundTxHashToId mapping returns 0 because 0xabc123... is not present in the mapping.
The function proceeds to create a refuel transaction for outboundTransactions[0], which is incorrect and can cause unintended behavior.
note:This issue is also present in the
finaliseRefuelTxSerializing
Attachments
The vulnerability lies in the
startRefuelTxSerializing
andfinaliseRefuelTxSerializing
as we can see in the above functions there is no verification on the
outgoingTxHash
, leading to potential creation of refuel transactions for incorrect outbound transactions.