Blinded path payloads don't reject unknown TLVs per BOLT4

Abierto
#4,442 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #4546 de @officialasishkumar — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Rust
Estrellas
1.4k
Forks
482
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lightningdevkit/rust-lightning

Todos los issues de lightningdevkit/rust-lightning

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.