Blinded path payloads don't reject unknown TLVs per BOLT4

オープン
#4,442 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #4546 @officialasishkumar による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)

主要言語
Rust
スター
1.4k
フォーク
482
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lightningdevkit/rust-lightning のほかの issue

lightningdevkit/rust-lightning の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。