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

Allow nodes to overshoot final htlc amount and expiry #2468

Merged
merged 1 commit into from
Nov 4, 2022

Commits on Oct 25, 2022

  1. Allow nodes to overshoot final htlc amount and expiry

    When nodes receive HTLCs, they verify that the contents of those HTLCs
    match the intructions that the sender provided in the onion. It is
    important to ensure that intermediate nodes and final nodes have similar
    requirements, otherwise a malicious intermediate node could easily probe
    whether the next node is the final recipient or not.
    
    Unfortunately, the requirements for intermediate nodes were more lenient
    than the requirements for final nodes. Intermediate nodes allowed overpaying
    and increasing the CLTV expiry, whereas final nodes required a perfect
    equality between the HTLC values and the onion values.
    
    This provided a trivial way of probing: when relaying an HTLC, nodes could
    relay 1 msat more than what the onion instructed (or increase the outgoing
    expiry by 1). If the next node was an intermediate node, they would accept
    this HTLC, but if the next node was the recipient, they would reject it.
    
    We update those requirements to fix this probing attack vector.
    
    See lightning/bolts#1032
    t-bast committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    975cd7b View commit details
    Browse the repository at this point in the history