Skip to content
Access control Audit finding Intermediate

An attacker can make users unable to cancel their L1 calls on Ethereum To Arbitrum

The EthereumToArbitrumRelayer contract sets the callValueRefundAddress to msg.sender when creating a retryable ticket, so the address that processes a user's calls becomes the only one able to cancel the ticket. An attacker can process a user's calls and then prevent that user from cancelling them.

ktg Follow with 0x52

Originally disclosed on Code4rena

Submitted by ktg, also found by 0x52

EthereumToArbitrumRelayer.sol#L118-#L127

When someone wants to make calls to Arbitrum from Ethereum, first they call relayCalls to fingerprint their data and then anyone else can call processCalls to process the calls. According to the doc in Inbox source code https://github.com/OffchainLabs/nitro/blob/1f32bec6b9b228bb2fab4bfa02867716f65d0c5c/contracts/src/bridge/Inbox.sol#L427, function createRetryableTicket has one parameter called callValueRefundAddress and this is the address that is granted the option to cancel a Retryable. In EthereumToArbitrumRelayer.sol it’s currently set as msg.sender (5th parameter) which is whoever make the call to function processCall:

uint256 _ticketID = inbox.createRetryableTicket{ value: msg.value }(
      address(executor),
      0,
      _maxSubmissionCost,
      msg.sender,
      msg.sender,
      _gasLimit,
      _gasPriceBid,
      _data
    );

This implementation allows an attacker to remove the possibility of a user to cancel their calls, which is an important mechanism to be properly implemented. This scenario demonstrates how this could happen:

  • User A call relayCalls to fingerprint their calls
  • User B call processCalls to process user A’s calls.
  • User A now changes his mind and wants to cancel his calls but he’s unable to since callValueRefundAddress is set to user B’s address, now user B is the one who decides whether to cancel user A’s calls or not, which should be user A’s option.
  • Another common case is when users’s calls failed, anyone can try to redeem it, according to the doc https://developer.arbitrum.io/arbos/l1-to-l2-messaging. So if a someone calls processCalls to process others’s calls and it fails, the owner of the calls now cannot cancel their calls and anyone else can redeem (reexecute) them.

It should be noted here that EthereumToArbitrumRelayer.sol provides no other functionality to cancel users’s calls, but it seems to rely only on Arbitrum’s Retryable cancel mechanism to do so.

Recommended Mitigation Steps

Currently, anyone can process others’s calls by calling processCalls functions and I think this does not pose any security risk as long as the user who actually fingerprinted these calls can reserve their rights to cancel it if they want to. Therefore, I recommend changing callValueRefundAddress in createRetryableTicket to _sender, this combines with event ProcessedCalls(_nonce, msg.sender, _ticketID) emitted at the end of processCalls function will allow a user to be notified if their calls has been processed by anyone else and they can cancel it in L2 using _ticketID.

Alex the Entreprenerd (judge) commented:

Relayer has privilege to cancel arbitrum txs, I think there may be a similar finding, but for now will keep separate.

PierrickGT (PoolTogether) confirmed and commented:

Very nice find! I’ve fixed the issue in the following PR: https://github.com/pooltogether/ERC5164/pull/10

Alex the Entreprenerd (judge) commented:

Worth flagging that allowing the caller to pass an arbitrary address may not solve, as I’d argue the only address that would rationally prevent the grief is the _sender, not fully sure if that is sufficient though.

Alex the Entreprenerd (judge) commented:

The Warden has shown a specific scenario in which Arbitrum tickets, which are meant to be cancellable by the caller / the sender, can be griefed.

Because this breaks the expectations of the code, and denies a functionality which was explicitly added, I agree with Medium Severity.


The original report as published on Code4rena, by ktg. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the contract passes msg.sender as the callValueRefundAddress to createRetryableTicket, so the processing caller rather than the original sender gets the cancellation right.

Impact

A user may be unable to cancel their calls, and if the calls fail anyone else can redeem them, so the user loses control over cancellation.

What the attacker needed

Attacker can call processCalls; victim has already called relayCalls

The fix

The issue was fixed by changing callValueRefundAddress to _sender in createRetryableTicket.

How it was found

  1. User A calls relayCalls to fingerprint their calls.
  2. User B calls processCalls to process user A's calls.
  3. User A tries to cancel but cannot because callValueRefundAddress is set to user B's address.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you send a message from Ethereum to Arbitrum, a ticket is created that can be cancelled by a specific address. The contract mistakenly gives that cancellation right to whoever processes the message, not to the person who originally sent it. So an attacker can process your message and then you lose the ability to cancel it.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by ktg

View all

10 more disclosed reports, best first.

More from PoolTogether

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.