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

Payment failure message with attached channel_update not checked #1707

Closed
joostjager opened this issue Aug 9, 2018 · 1 comment · Fixed by #1738
Closed

Payment failure message with attached channel_update not checked #1707

joostjager opened this issue Aug 9, 2018 · 1 comment · Fixed by #1738
Labels
bug Unintended code behaviour P3 might get fixed, nice to have routing

Comments

@joostjager
Copy link
Collaborator

Background

It seems that channel_updates that are received from hops during payment are not checked fully. It is possible for a hop to modify channel policies in the sender node graph for channels that that hop does not take part in.

This will make it possible for a node to modify other nodes policies. A malicous node could try to attract traffic to itself by effectively disabling competing channels.

Your environment

lnd master bb310a3
Linux 4.13.0-36-generic #40~16.04.1-Ubuntu SMP
btcd simnet

Steps to reproduce

  • Create three nodes on simnet: A, B and C.
  • Open channels: A-B, B-C, C-A.
  • Modify node B to always report FeeInsufficient with a channel update that targets the channel id of channel A-C and a recognizable change like base fee 1234 msat.
  • Use SendToRoute to send a payment A->B->C.
  • It will fail because B reports FeeInsufficient.

Expected behaviour

A should not push the channel update for its channel A-C to its channel db.

Actual behaviour

The policy of channel A-C as reported by A is updated according to the data given by B.

@Roasbeef Roasbeef added bug Unintended code behaviour routing P3 might get fixed, nice to have labels Aug 14, 2018
@Roasbeef
Copy link
Member

It is possible for a hop to modify channel policies in the sender node graph for channels that that hop does not take part in.

All channel updates are signed. Therefore, the only way for a node to make us accept an update for a channel they didn't take part in, is to obtain the private key of another node, or somehow trick/force them into signing an update.

So the main issue is that we don't currently validate the signature of channel update we receive via the onion error in the case of a routing failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour P3 might get fixed, nice to have routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants