Commit 8d8313d
committed
Correct blinded path forwarding CLTV expiry check
The `PaymentConstraints::max_cltv_expiry` field exists to ensure
a blinded path expires across the entire path at once - once the
path is expired it will be rejected by the introduction node rather
than traversing the entire path and failing at the destination.
This was broken by the fact that we were checking the outgoing CLTV
value rather than the incoming one, which admittedly isn't clear in
the spec but is somewhat implied. Here we fix this, updating a test
which was actually (kinda) exploiting this privacy loss rather than
allowing the HTLC to fail at the introduction node.
This, of course, does not risk funds loss as our own CLTV policy is
still enforced on top. The only impact it could have is a recipient
which was relying on blinded path expiry to avoid some cost (e.g.
LSPS5 node wakeup cost) involved in receiving an HTLC they
ultimately fail, though I'm not aware of any practical deployment
where that is a concern.
Reported by Jordan Mecom of Block's Security Team1 parent 9f73a98 commit 8d8313d
2 files changed
Lines changed: 14 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1886 | 1886 | | |
1887 | 1887 | | |
1888 | 1888 | | |
1889 | | - | |
1890 | | - | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
1891 | 1892 | | |
1892 | 1893 | | |
1893 | 1894 | | |
| |||
1902 | 1903 | | |
1903 | 1904 | | |
1904 | 1905 | | |
1905 | | - | |
1906 | 1906 | | |
1907 | 1907 | | |
1908 | 1908 | | |
| |||
1939 | 1939 | | |
1940 | 1940 | | |
1941 | 1941 | | |
1942 | | - | |
1943 | | - | |
1944 | | - | |
1945 | | - | |
1946 | | - | |
1947 | | - | |
1948 | | - | |
1949 | | - | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1953 | 1950 | | |
| 1951 | + | |
| 1952 | + | |
1954 | 1953 | | |
1955 | 1954 | | |
1956 | 1955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments