Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Failure to reject `option_scid_alias` on an announced channel

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

メンテナーはふだん 2 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c

調査の方向性

channel_type_accept() から開始し、channel_flags が openingd と dualopend の funding パスを通じてどのように渡されるかを追跡します。告知された open_channel が option_scid_alias を設定する v1 funding protocol のケースを、smite fuzzing の発見を文脈として再現します。無効な組み合わせが受信時に拒否され、有効な channel type が引き続きプロトコルを通過すれば完了です。

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

説明

BOLT 2 forbids the sender of open_channel from setting the option_scid_alias bit in channel_type when announce_channel is true:

The sending node:

  • if it includes open_channel_tlvs:
    • MUST set channel_type:
      • if announce_channel is true (not 0):
        • MUST NOT send channel_type with the option_scid_alias bit set.

CLN never generates this combination as opener, but it does not reject it on receipt: channel_type_accept() never sees channel_flags, so the fundee happily replies with accept_channel echoing back option_scid_alias on a channel it will then announce. The spec does not specify rules for the acceptor in this case, so accepting it is not itself a violation, but the resulting channel is internally inconsistent.

Impact

Both openingd and dualopend are affected. The effect is that both can exchange announcement_signatures and publicly announce the channel using its real short_channel_id. However, per BOLT, when the agreed channel type has option_scid_alias set, a node MUST NOT allow incoming HTLCs to that channel using the real short_channel_id. So if the peer returns its signatures, CLN ends up announcing a channel to the whole network and then refusing every HTLC (addressed to that short_channel_id) it is asked to forward to the peer, which only affects the peer.

Only forwards towards the peer are affected, inbound HTLCs still work. For CLN, this means gaining some bad reputation for unnecessarily failing HTLCs. Other than that, this is purely a spec-compliance issue.

Discovery

This bug was found while fuzzing the v1 funding protocol with smite.

主要言語
C
スター
3.1k
フォーク
1k
平均マージ
3日 10時間
マージ済み PR(30日)
40

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

ElementsProject/lightning のほかの issue

ElementsProject/lightning の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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