clboss/Boss
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
..
Mod FundsMover: verify incoming amount before resolving self-payment HTLCs 2026-08-11 14:56:24 -07:00
ModG Boss/Msg/ReqRespTraits.hpp: Use a traits class for requests and response. 2023-07-11 20:57:51 +08:00
Msg feat: add clang C++20 build job to CI 2026-03-04 11:24:31 -08:00
concurrent.cpp Ev/Io.hpp: Avoid copying objects, just move things around. 2020-09-14 09:12:46 +08:00
concurrent.hpp Boss/concurrent.cpp: Wrapper for Ev::concurrent that ignores Boss::Shutdown exceptions. 2020-09-07 07:39:36 +08:00
JsonInput.cpp Boss/Mod/CommandReceiver.cpp: Handle rpc_command at this level, to increase our responsiveness. 2020-11-10 10:19:53 +08:00
JsonInput.hpp Boss/JsonInput.cpp: Implement input loop. 2020-09-07 11:51:30 +08:00
log.cpp Util/Str.cpp: Implement Util::Str::fmt. 2021-10-06 19:26:55 +08:00
log.hpp Boss/log.hpp: Have GCC do printf checks. 2020-11-24 18:58:39 +08:00
Main.cpp Avoid program_invocation_name which is available only on Linux 2024-10-28 12:12:15 -05:00
Main.hpp Boss/open_rpc_socket.cpp: Function to open the RPC socket. 2020-09-07 21:50:38 +08:00
open_rpc_socket.cpp Use BacktraceException for appropriate (most) exceptions 2024-08-19 15:04:30 -07:00
open_rpc_socket.hpp Boss/open_rpc_socket.cpp: Function to open the RPC socket. 2020-09-07 21:50:38 +08:00
random_engine.cpp Use BacktraceException for appropriate (most) exceptions 2024-08-19 15:04:30 -07:00
random_engine.hpp Boss/random_engine.cpp: Common random engine. 2020-09-10 00:13:02 +08:00
Shutdown.hpp Boss/Shutdown.hpp: Trivial struct for signalling shutdown. 2020-09-07 07:06:30 +08:00
Signer.cpp Use BacktraceException for appropriate (most) exceptions 2024-08-19 15:04:30 -07:00
Signer.hpp Boss/Signer.cpp: Signer for boltz-swapping transactions. 2020-09-23 12:45:50 +08:00