Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Failure to reject `option_scid_alias` on an announced channel

Aperta
#9,444 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Inizia da channel_type_accept() e traccia come channel_flags vengono passati attraverso i percorsi di finanziamento di openingd e dualopend. Riproduci il caso del protocollo di finanziamento v1 in cui un open_channel annunciato imposta option_scid_alias, usando come contesto la scoperta del fuzzing di smite. Il lavoro è completato quando la combinazione non valida viene rifiutata alla ricezione, mentre i tipi di canale validi continuano attraverso il protocollo.

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

Descrizione

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.

Lingua principale
C
Stelle
3.1k
Fork
1k
Merge medio
3g 10h
PR unite (30g)
40

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 ElementsProject/lightning

Tutte le issue di ElementsProject/lightning

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.