Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malicious relayer attack preventing correct tying of connection ends #32

Closed
4 tasks
ancazamfir opened this issue Nov 11, 2020 · 3 comments
Closed
4 tasks

Comments

@ancazamfir
Copy link

Summary

Summarizing here discussion with @milosevic and Ilina about this and also @ebuchman on cosmos/cosmos-sdk#7870:

A connection or channel will never reach Open state if there is a mismatch in the identifiers. It is very simple to write a relayer that watches the OpenInit events from A and immediately send a MsgOpenInit to B with mismatched connection ids, blocking forever the handshake on the connection/ channel.

It may be that the “correct” relayer that would guarantee that the handshake finishes would have to do something like:

  • always send MsgOpenInit without specifying the counterparty connection id (this is allowed now in order to support flexible id selection)
  • specify the counterpary connection id in OpenTry (i.e. tie the two connection ends with a message that carries proofs)

So maybe one solution is to not allow the MsgOpenInit with counterparty connection_id specified.

This should be looked at more closely and determine the best solution.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@mconcat
Copy link

mconcat commented Jan 4, 2021

Without adding spec level constraints on identifiers, this would be the simplest solution.

@colin-axner
Copy link
Contributor

Has this been fixed with the auto-generated identifier changes?

cc @cwgoes

@colin-axner colin-axner transferred this issue from cosmos/cosmos-sdk Mar 4, 2021
@cwgoes
Copy link
Contributor

cwgoes commented Mar 4, 2021

Yes, this is no longer applicable, I believe.

@cwgoes cwgoes closed this as completed Mar 4, 2021
faddat referenced this issue in notional-labs/ibc-go Feb 23, 2022
Use json.RawMessage to displays bytes nicer in json format
faddat referenced this issue in notional-labs/ibc-go Mar 1, 2022
* Update to lastest ibc-alpha

* update to latest cosmos-sdk@ibc-alpha

* Add indentifier validation from ics24 and use it throughout codebase
faddat referenced this issue in notional-labs/ibc-go Mar 1, 2022
* Fix height issue in relay packets

* Remove unnecessary context call

* WIP refactor

* refactor cont.

* dev-env working

* I think this is working?

Co-authored-by: jtieri <37750742+jtieri@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants