When sending data to a low level call, NativeMetaTransaction.hashMetaTransaction()
uses abi.encodePacked
instead of abi.encodeWithSelector
. The data packed will become condensed which will not have the padding needed for a proper low level call.
In NativeMetaTransaction.sol, there is a function that is supposed to be called by the relayer for the user. This function uses abi.encodePacked
as part of the data called instead of abi.encodeWithSelector()
.
Since address is used, the bytes are packed, which makes data
have lesser bytes than intended to complete a successful call.
Take a look at this Remix test:
Calling testSelector()
succeeds but calling testPacked()
fails. abi.encodePacked
compacts the bytes which makes it unreadable through a low level call.
abi.encodePacked()
returns 0x4d44e6635c7078010ea1046720d08daef080e1f75bb13682
whereas abi.encodeWithSelector()
returns 0x4d44e6630000000000000000000000005c7078010ea1046720d08daef080e1f75bb13682
Function cannot work.
Manual Review
Change abi.encodePacked
to abi.encodeWithSelector
.
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.