Blinded path payloads don't reject unknown TLVs per BOLT4

Aperta
#4,442 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #4546 di @officialasishkumar — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Start from the TLV decode path cited in the issue (lightning/src/util/ser_macros.rs around the odd/even check) and BlindedReceive handling in msgs.rs. Compare intermediate vs final blinded-path allowlists in BOLT4. There is a closed unmerged PR (#4546); read that thread before duplicating work. Done means unknown TLVs are rejected as specified and existing onion/TLV tests cover both node roles.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backport 0.1 backport 0.2

BOLT4 requires strict TLV allowlisting for blinded paths, but rust-lightning uses the standard odd/even rule (ignore unknown odd TLVs).

BOLT4 Requirements: (https://github.com/lightning/bolts/blob/master/04-onion-routing.md#requirements)

Intermediate nodes: MUST reject payloads containing TLVs other than encrypted_recipient_data and current_path_key. (https://github.com/lightning/bolts/blob/8f2908b56363927e167e7235d4a9d191c1bd2aa8/04-onion-routing.md?plain=1#L314C6-L315C126)

Final nodes: MUST reject payloads containing TLVs other than encrypted_recipient_data, current_path_key, amt_to_forward, outgoing_cltv_value, and total_amount_msat. (https://github.com/lightning/bolts/blob/8f2908b56363927e167e7235d4a9d191c1bd2aa8/04-onion-routing.md?plain=1#L322)

Current Behavior:

lightning/src/util/ser_macros.rs:687-689:

if t % 2 == 0 {
    return Err(DecodeError::UnknownRequiredFeature);
}
// Unknown odd TLVs silently ignored instead of rejected

Additionally, BlindedReceive payloads accept custom TLVs >= 65536 (msgs.rs:3894-3900).

  • LND rejects blinded packets with extra TLVs (spec-compliant)
  • rust-lightning accepts them (non-compliant)

Found using differential fuzzing (bitcoinfuzz)

Lingua principale
Rust
Stelle
1.4k
Fork
482
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lightningdevkit/rust-lightning

Tutte le issue di lightningdevkit/rust-lightning

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.