clboss/Boss/Mod/FundsMover
Ken Sedgwick 3c8dc3c16d
FundsMover: verify incoming amount before resolving self-payment HTLCs
The claim of a returning self-payment matched payment_hash and
payment_secret but not the HTLC amount.  Answering the hook with
resolve settles the HTLC at once, so lightningd's own
final_incorrect_htlc_amount check is skipped.  The last-hop peer
relays our onion (and thus the secret) intact but chooses the offered
amount, so it could settle a reduced HTLC, learn the preimage, and
claim the full amount upstream.

Record the intended amount at Claimer::generate() time and resolve
only an exact match; a mismatch is left to normal handling, which
fails the HTLC for lack of an invoice.

The same issue was recently fixed in sling (daywalker90/sling@835f36e8).

Fixes #322.
2026-08-11 14:56:24 -07:00
..
Attempter.cpp Insert exception what() value in logging messages 2024-08-19 15:04:30 -07:00
Attempter.hpp Boss/Mod/FundsMover/*: Make more parsimonious about fee budget when splitting. 2021-01-05 11:32:46 +08:00
Claimer.cpp FundsMover: verify incoming amount before resolving self-payment HTLCs 2026-08-11 14:56:24 -07:00
Claimer.hpp FundsMover: verify incoming amount before resolving self-payment HTLCs 2026-08-11 14:56:24 -07:00
create_label.cpp Boss/Mod/FundsMover/PaymentDeleter.cpp: Delete our FundsMover payments periodically. 2020-11-11 15:14:08 +08:00
create_label.hpp Boss/Mod/FundsMover/PaymentDeleter.cpp: Delete our FundsMover payments periodically. 2020-11-11 15:14:08 +08:00
Main.cpp Boss/Mod/FundsMover/Main.cpp: Block and log an error if something tries to move from or to an unmanaged node. 2022-05-11 12:09:13 +00:00
Main.hpp Boss/Mod/FundsMover/Main.cpp: Finish packaging up funds mover module. 2020-10-22 08:48:09 +08:00
Runner.cpp FundsMover: verify incoming amount before resolving self-payment HTLCs 2026-08-11 14:56:24 -07:00
Runner.hpp Boss/Mod/FundsMover/*: Make more parsimonious about fee budget when splitting. 2021-01-05 11:32:46 +08:00