rust-lightning/lightning/src/ln
Matt Corallo 5e07c60f9e Correctly handle BADONION onion errors
Currently we entirely ignore the BADONION bit when deciding how to
handle HTLC failures. This opens us up to an attack where a
malicious node always fails HTLCs backwards via
`update_fail_malformed_htlc` with an error code of
`BADONION|NODE|PERM|X`. In this case, we may decide to interpret
this as a permanent node failure for the node encrypting the onion,
i.e. the counterparty of the node who sent the
`update_fail_malformed_htlc` message and ultimately failed the
HTLC.

Thus, any node we route through could cause us to fully remove its
counterparty from our network graph. Luckily we do not do any
persistent tracking of removed nodes, and thus will re-add the
removed node once it is re-announced or on restart, however we are
likely to add such persistent tracking (at least in-memory) in the
future.
2022-09-13 02:21:35 +00:00
..
chan_utils.rs Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
chanmon_update_fail_tests.rs Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
channel.rs Modify ecdh to take Scalar 2022-08-11 00:21:26 +02:00
channelmanager.rs Clarify and consolidate event handling requirements 2022-09-06 20:56:24 +00:00
features.rs Refuse to send and forward OMs to disconnected peers 2022-09-02 16:27:30 -04:00
functional_test_utils.rs Move open_zero_conf_channel utility to common test utils 2022-09-02 21:29:32 +00:00
functional_tests.rs Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
inbound_payment.rs Pass FinalOnionHopData to payment verify by reference, not clone 2022-05-02 09:37:23 -07:00
mod.rs Merge pull request #1503 from valentinewallace/2022-05-onion-msgs 2022-08-03 04:39:56 +00:00
monitor_tests.rs Rename MaybeClaimableHTLCAwaitingTimeout for consistency 2022-08-25 18:51:42 +00:00
msgs.rs Refuse to send and forward OMs to disconnected peers 2022-09-02 16:27:30 -04:00
onion_route_tests.rs Merge pull request #1403 from jurvis/jurvis/add-paymentforwardingfailed-event 2022-07-25 19:23:53 -05:00
onion_utils.rs Correctly handle BADONION onion errors 2022-09-13 02:21:35 +00:00
payment_tests.rs Correct payment resolution after on chain failure of dust HTLCs 2022-09-06 20:23:18 +00:00
peer_channel_encryptor.rs Use new spec repository URL. 2022-05-20 17:17:29 +02:00
peer_handler.rs Refuse to send and forward OMs to disconnected peers 2022-09-02 16:27:30 -04:00
priv_short_conf_tests.rs Move open_zero_conf_channel utility to common test utils 2022-09-02 21:29:32 +00:00
reorg_tests.rs Fix off-by-one in test_onchain_htlc_claim_reorg_remote_commitment 2022-08-15 23:18:12 +00:00
script.rs Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
shutdown_tests.rs Rename UserConfig and LegacyChannelConfig fields 2022-06-13 13:57:00 -07:00
wire.rs Add boilerplate for sending and receiving onion messages in PeerManager 2022-08-26 19:02:59 -04:00