Skip to content

lnwire: limit channel update reader#7262

Merged
Roasbeef merged 1 commit into
lightningnetwork:masterfrom
bottlepay:fix-failure-tlv
Jan 5, 2023
Merged

lnwire: limit channel update reader#7262
Roasbeef merged 1 commit into
lightningnetwork:masterfrom
bottlepay:fix-failure-tlv

Conversation

@joostjager

@joostjager joostjager commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

Fixes a bug where channel update data is read until the end of the stream rather than stopping after the specified length. This is problematic when failure message tlv data is present, because this data is interpreted as channel update tlv data. The extra data isn't covered by the channel update signature, and the channel update is discarded.

Thanks to @t-bast for pointing this out.

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread lnwire/onion_error.go Outdated
@lightninglabs-deploy

Copy link
Copy Markdown
Collaborator

@guggero: review reminder

@guggero guggero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM 🎉

Comment thread lnwire/onion_error_test.go Outdated
Fixes a bug where channel update data is read until the end of the stream
rather than stopping after the specified length. This is problematic
when failure message tlv data is present, because this data is interpreted
as channel update tlv data.
@joostjager

Copy link
Copy Markdown
Contributor Author

Rebased

@Roasbeef Roasbeef left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌙

@Roasbeef Roasbeef added this to the v0.16.0 milestone Jan 5, 2023
@Roasbeef Roasbeef merged commit e29a5a5 into lightningnetwork:master Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants