A denial-of-service vulnerability in Core Lightning’s channel opening flow was fixed in Core Lightning v26.06.8.
Users should upgrade to the latest release to protect their nodes.
Core Lightning v0.12.0 through v26.06.7 accept a funding_created that reuses another channel’s funding outpoint, so the two channels share a v1 channel_id.
If both channels are live, reconnecting trips an assertion in connectd and crashes the node, at no cost to the attacker and repeatably on every restart.
If the first channel is already closed, closing the second trips an assertion in lightningd, and the node crash-loops on restart until upgraded, at the cost of only on-chain fees.
smite found this vulnerability with its IR scenario while fuzzing CLN’s funding flow.
It flagged that CLN answered a funding_created reusing another channel’s funding outpoint with funding_signed, and further investigation surfaced the crash on reconnect.
The closed-channel variant was found separately by Crypt-iQ.
Nice writeup. I only looked into this because the smite trophy for this caught my eye and the CLN fix looked suspect.
There was a version of the closed-channel bug that did not crash-loop and was free for the attacker: if the attacker simply sent an error on the first channel, the channel would get added to the closed channel map and then the same assertion could be reached if they repeat this again. Do you know why smite didn’t find this?
Also, I believe it was possible to hit the same assertion by not reusing outpoints but instead by giving different outpoints that map to the same channel_id. So the original fix should have really been checking channel_id instead of the minimal fix of checking only live outpoint matches. This type of duplicate outpoint / channel_id trick is a really simple gotcha that is hopefully fixed across the implementations by now.
Yes, we experimented with this case as well. There is also another way to trigger the persistent crash loop, so we documented the worst-case impact using one of the simplest attack paths.
Yes, smite found the same channel_id collision issue in one other LN implementation, but hasn’t found it in any others so far. So we expect the rest to handle it correctly.