Skip to content

Hermes: Make sure hermes cannot be slowed down by packets to fake chains  #1038

Closed
@gamarin2

Description

If I'm not mistaken, when Hermes catches an IBC transfer to relay, it does the following:

  1. Figure out source channel
  2. Using source channel, query the source chain to get the counterparty's chain-id
  3. Create packets and submit them to counterparty chain

The (potential) issue is that chain-ids are not unique, meaning it is possible for someone to create an IBC connection with a chain-id that is exactly the same as the chain-id of a "real chain". This could potentially be a problem is hermes retries multiple times if header verification fails. Consider the following scenario:

  1. An IBC connection between Cosmos Hub and Akash is open. On Cosmos Hub, the client ID of Akash is client-1 and the chain-id is akash-1.
  2. An attacker creates a fake Akash chain using starport and opens an IBC connection with the Hub. The attacker uses the same chain-id akash-1, only the client-id is different, client-2.
  3. The attacker then sends a bunch of IBC transfers from Cosmos Hub to the fake Akash chain.
  4. Hermes picks up the packets. It reads the counterparty chain-id for the channel, which gives akash-1.
  5. Hermes then tries to relay the packet to the real Akash chain, but the relaying fails during header verification. Hermes then retries (how many times?).

My questions is: do we have a problem? Can this slow down Hermes significantly?

cc @ancazamfir @romac @andynog

Metadata

Assignees

Labels

I: logicInternal: related to the relaying logic

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions