Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…
This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…
State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …
Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.
This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …
This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…
This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…
State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…
API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…
Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…
Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …
Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …
Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…
Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) i…
Integer overflow in fee computationPreviously unreachable!() panic path reachableMPP path merge could trigger overflow
This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted…
Fixes a state-machine stall on node reload that could leave channels non-functionalRemoves an overstrict assertion that would panic on a legitimate post-reload stateAdds explicit detection of monitor persistence completed in a prior process
This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was a…
This commit only changes documentation comments in two source files. It corrects the wording of how certain public keys are derived in the Lightning protocol and adds details about which witness script a signer must use when creating justi…
Documentation-only changeClarifies key derivation semantics for Lightning commitment transactionsClarifies justice transaction witness script requirements for signers
This change only adds documentation comments to a Rust struct. It does not modify any executable code, so it cannot by itself introduce or fix a security vulnerability. The new text warns developers that using TokioSpawner incorrectly can …
This commit hardens how Lightning Dev Kit handles custom signing modules. Previously, LDK relied on each custom signer to check that the other party's signatures on a holder commitment transaction were valid. The change adds a ready-made v…
New synchronous signature-verification helper for holder commitment transactionsTrait documentation now mandates verification before Ok(()) because LDK acts immediatelyInMemorySigner now validates that holder funding key belongs to signer before signature checks
This update fixes a corner case in the Lightning Dev Kit where a node could get confused if it received a 'channel_ready' message while still waiting for its own signer to produce the first commitment signature. The patch makes the node re…
State-machine confusion between funding_signed and channel_ready in async signer flowPremature channel_ready could advance counterparty_next_commitment_point before initial commitment is signedPatch closes channel rather than allowing inconsistent commitment state
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Security candidateCorrect FeeEstimator docs on the 253 sat/kW lower boundby auto-pr-bot · ea2051fe · Nov 21, 2026 · 1 fileMessage 81 · StrongInformational 15Details
Commit message · auto-pr-bot
Correct FeeEstimator docs on the 253 sat/kW lower bound
@matt asked in #5649:
> @auto-pr-bot please fix `FeeEstimator`'s documentation - while lightning > protocol things always use a feerate of at least 253, not everything does, > nor should everything now that feerates can be below 1.0 sat/vB. > `OutputSweeper`, notably, accepts a lower feerate.
The trait's docs claimed LDK always bounds the value returned by `get_est_sat_per_1000_weight` below by 253 sats/KW, but that bound is only applied where lightning protocol feerates are required, via the `LowerBoundedFeeEstimator` wrapper. Callers outside channel management use the estimate as-is; most notably `OutputSweeper` passes the value returned for `ConfirmationTarget::OutputSpendingFee` straight to the output spender, so implementations must not rely on LDK enforcing a minimum.
Documentation-only change; no behavioural difference.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
secure hardware boundary
AI analysis · Informational 15/100
This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimum only applies to Lightning protocol fee rates, not to all uses of the fee estimate. No code behavior changes.
Security candidateMerge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)by Matt Corallo · ca778e61 · Nov 20, 2026 · 2 filesMessage 81 · StrongModerate 54Details
Commit message · Matt Corallo
Merge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)
from bot/5551-splice-never-locks-if-confirmed-7f1dca into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5570 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Moderate 54/100
This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the signature exchange completed, the node could fail to notice the confirmation, potentially leaving the channel stuck or sending splice_locked at the wrong time. The patch makes the node track the unconfirmed splice transaction too, so confirmations and reorgs are handled correctly even while signatures are still being exchanged.
Security candidateMerge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)by Matt Corallo · 03ca832f · Nov 20, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · Matt Corallo
Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)
from bot/5664-linting-failing-f44275 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5689 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.
Security candidateReplace cloned array literal with slice::from_ref in reload testby auto-pr-bot · 93e0129c · Nov 20, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · auto-pr-bot
Replace cloned array literal with slice::from_ref in reload test
Clippy 1.99 (via `-D warnings` in CI) rejects `[funding_tx.clone()]` inside `assert_eq!` under the `cloned_ref_to_slice_refs` lint: the macro takes its operands by reference, yielding a `&[funding_tx.clone()]` slice reference built from a needless clone.
@matt asked in #5664:
> @auto-pr-bot please fix CI:
Use `core::slice::from_ref(&funding_tx)` as clippy suggests, matching the pattern already used elsewhere in the test suite (e.g. blinded_payment_tests.rs, payment_tests.rs). This also drops the clone of the funding transaction; `funding_tx` is still owned and used later in the test.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update path
AI analysis · Informational 15/100
This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and no security relevance.
Security candidateMerge PR 'Guard pending closing signatures before channel_ready' (#5681)by Matt Corallo · a01273a2 · Nov 20, 2026 · 1 fileMessage 81 · StrongModerate 68Details
Commit message · Matt Corallo
Merge PR 'Guard pending closing signatures before channel_ready' (#5681)
from auto-pr-bot/bot/388-guard-pending-closing-signatures-679e36 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5681 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Moderate 68/100
This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combine its fresh signature for the new fee with a cached peer signature for the old fee, producing an invalid closing transaction and potentially preventing the channel from closing cleanly. The fix expands the guard that detects a pending closing signature to cover earlier channel states, so such renegotiation attempts are rejected with a warning.
Security candidateMerge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)by Matt Corallo · 3c606c11 · Nov 18, 2026 · 2 filesMessage 81 · StrongModerate 54Details
Commit message · Matt Corallo
Merge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)
from bot/5631-prevent-monitors-from-aliasing-w-ff2601 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5645 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 54/100
This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier as a previously closed and archived channel, the new monitor could be saved on top of the archived one. Later, when the new channel closed, its archived copy would overwrite the old archived copy, permanently destroying the historical record needed to detect cheating or recover funds. The fix makes the node refuse to save a new monitor when an archived one already exists under the same key, leaving the new channel 'stuck' instead of silently destroying data. This is a safety improvement rather than a remote-exploitable bug.
Security candidateMerge PR 'Handle fee multiplication overflow when merging MPP paths' (#5288)by Matt Corallo · 25f8a740 · Nov 18, 2026 · 1 fileMessage 86 · StrongModerate 52Details
from bot/5191-handle-fee-multiplication-overfl-b098ce into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5288 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Moderate 52/100
This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) if it did. The patch now detects the overflow, returns an error value, and safely skips or keeps the affected payment path instead of crashing. It also prevents a path from being left half-updated if the fee recalculation fails.
Security candidateMerge PR 'Resume channels stuck awaiting a completed monitor persistence on reload' (#5610)by Matt Corallo · 11815ed1 · Nov 18, 2026 · 4 filesMessage 81 · StrongLow 43Details
Commit message · Matt Corallo
Merge PR 'Resume channels stuck awaiting a completed monitor persistence on reload' (#5610)
from bot/5603-initial-monitor-persist-completi-cc6c58 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5610 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Low 43/100
This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted node would not realize the save was done. As a result, it would never broadcast the funding transaction or resume the channel, leaving funds temporarily inaccessible and the channel unusable. The fix makes the node check on reload whether the monitor persistence actually completed and, if so, resume the channel normally.
Security candidateMerge PR 'Correct KeysManager docs on spliced channels' remote_key derivation' (#5609)by Matt Corallo · 83a4d243 · Nov 17, 2026 · 1 fileMessage 81 · StrongInformational 15Details
from bot/5606-keysmanager-docs-still-say-splic-5df634 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5609 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
secret or key materialsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was altered, so there is no security vulnerability or fix here.
Security candidateMerge PR 'Fix DelayedPaymentKey/HtlcKey from_basepoint docs and document justice tx witness script' (#5596)by Matt Corallo · 2f832195 · Nov 17, 2026 · 2 filesMessage 81 · StrongInformational 15Details
from auto-pr-bot/bot/272-wrong-basepoint-in-delayedpaymen-236086 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5596 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit only changes documentation comments in two source files. It corrects the wording of how certain public keys are derived in the Lightning protocol and adds details about which witness script a signer must use when creating justice (penalty) transactions. No code logic, function signatures, or behavior were modified.
from bot/5244-reject-overflowing-legacy-paymen-748c1f into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5316 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Low 44/100
This change fixes a spot where two payment amounts could be added together without checking for integer overflow. In Rust, adding two large u64 numbers can wrap around to a tiny value, which could make a forwarded payment look incorrectly small. The patch now rejects the data if the addition overflows. This is a defensive fix in event deserialization/serialization logic.
Allow monitor_pending_channel_ready on resumed outbound channels
Resuming a channel whose initial monitor persistence completed while the node was down can race with chain sync: if the funding transaction was broadcast before the node went down and confirmed to the required depth while it was down, syncing the chain marks the still-paused channel's channel_ready as pending. monitor_updating_restored then hit an assertion that an outbound, non-zero-conf channel can never have monitor_pending_channel_ready set, turning a stuck channel into a panic at every startup - nothing is persisted before the panic, so the node could never come back up.
After a reload from a ChannelManager serialized before the broadcast, LDK did broadcast the funding transaction (in the prior process), so the funding can legitimately have confirmed; drop the assertion and just send channel_ready. Adds a test which confirms the funding transaction to the required depth between the reload and the first background-event processing, matching the startup ordering that hits the removed assertion.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update path
AI analysis · Moderate 50/100
This commit fixes a bug where a Lightning node could crash in a loop every time it started up. The crash happened when a channel's funding transaction had already confirmed while the node was offline, but the node still had old saved state. The old code wrongly assumed this situation was impossible and panicked. The fix removes that incorrect assumption and lets the node resume the channel normally. It is a denial-of-service/availability bug, not a theft-of-funds bug, and it can only be triggered by the node's own saved state and normal blockchain activity.
Security candidateMerge PR 'Avoid overflow in closing fee limit calculation' (#5284)by Matt Corallo · dc3f8eda · Nov 16, 2026 · 1 fileMessage 86 · StrongModerate 59Details
Commit message · Matt Corallo
Merge PR 'Avoid overflow in closing fee limit calculation' (#5284)
from bot/5185-prevent-peer-triggered-overflow-081f9f into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5284 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Moderate 59/100
This patch fixes an integer overflow in the code that calculates the maximum acceptable fee when negotiating a Lightning channel closing transaction. A malicious or buggy peer could potentially supply values that cause the arithmetic to overflow, leading to an incorrect fee limit. The fix uses Rust's saturating addition so the result cannot wrap around. This is a defensive hardening change in a single calculation.
Security candidateResume channels awaiting a completed monitor persistence on loadby auto-pr-bot · dc81ecb8 · Nov 16, 2026 · 3 filesMessage 81 · StrongModerate 53Details
Commit message · auto-pr-bot
Resume channels awaiting a completed monitor persistence on load
A channel serialized with MONITOR_UPDATE_IN_PROGRESS was only resumed on load through its tracked in-flight ChannelMonitorUpdates, but the initial ChannelMonitor write (from funding_created/funding_signed) is never tracked as one, and blocked updates the monitor already applied are dropped at load. A channel whose monitor persistence completed after the last ChannelManager write was therefore loaded with the flag set and nothing to ever clear it, leaving it stuck: as funder the funding transaction was never broadcast and channel_ready was never sent for confirmed funding, as acceptor channel_ready was never sent for the peer's confirmed funding. This state is reached with deferred monitor writes (where the background processor writes the ChannelManager before flushing the new monitor) or a Persist that returns InProgress for new channels, whenever the node goes down between the monitor write and the next ChannelManager write.
If a channel is still awaiting a monitor update on load, the monitor is present, and it has nothing in-flight or blocked, the persistence it was waiting on must have completed since we were last serialized, so queue a MonitorUpdatesComplete background event at the monitor's latest update_id, the same way completed in-flight updates are handled. Channels with blocked updates still go through AttemptUnblockMonitorUpdates and those with in-flight updates through the existing replay logic, so the new branch is exclusive with both.
Adds test_outbound_reload_with_completed_init_mon, mirroring the existing test_outbound_reload_without_init_mon but handing the monitor back on reload, and extends test_event_replay_causing_monitor_replay, which exercised the blocked-update variant of the same gap: the channel is now resumed on startup, so it expects the PaymentPathSuccessful produced by the resume and verifies a payment can be sent afterwards.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update path
AI analysis · Moderate 53/100
This commit fixes a bug in the Lightning Dev Kit where a newly-created channel could get permanently stuck after a restart. If the channel's first monitor save finished after the last ChannelManager save, the channel would reload believing it was still waiting for that save, but nothing would ever clear the wait. As a result, the funding transaction was never broadcast and the channel could never become usable. The fix detects this situation on load and resumes the channel automatically. It is a reliability/availability bug, not a direct theft-of-funds vulnerability, because the channel simply fails to open rather than funds being stolen.
Security candidateMerge PR 'Advise extract_tx_unchecked_fee_rate in sign_psbt docs' (#5599)by Matt Corallo · 75d8ba2c · Nov 16, 2026 · 1 fileMessage 81 · StrongInformational 18Details
Commit message · Matt Corallo
Merge PR 'Advise extract_tx_unchecked_fee_rate in sign_psbt docs' (#5599)
from bot/5594-sign_psbt-docs-advise-extract_tx-cd8cd5 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5599 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 18/100
This change only updates documentation comments for the sign_psbt methods in wallet utilities. It advises developers to use extract_tx_unchecked_fee_rate() instead of extract_tx() when signing PSBTs outside the library, because extract_tx() can reject transactions with very high fee rates that are legitimate in Lightning child-pays-for-parent fee-bumping scenarios. It is a documentation-only fix with no code behavior change.
Security candidateAdvise extract_tx_unchecked_fee_rate in sign_psbt docsby auto-pr-bot · 7bdcb4f0 · Nov 16, 2026 · 1 fileMessage 81 · StrongModerate 60Details
Commit message · auto-pr-bot
Advise extract_tx_unchecked_fee_rate in sign_psbt docs
The sign_psbt() doc comments on CoinSelectionSource, WalletSource and their synchronous counterparts told wallet implementors to call psbt.extract_tx() to get the transaction to sign. Since the rust-bitcoin 0.31 upgrade (a8bd4c097f7a, first released in v0.0.124-beta) that method rejects transactions paying more than 25,000 sat/vB, and LDK's own callers were switched to extract_tx_unchecked_fee_rate() at the same time while the docs were left behind.
The transactions handed to sign_psbt() can legitimately carry a fee above that cap: the anchor CPFP child LDK builds for a ChannelClose event folds the commitment transaction's fee into its own input value, so its fee pays for the whole package and its own feerate exceeds 25,000 sat/vB once the commitment is large enough (e.g. ~146 sat/vB target with 483 pending HTLCs). A wallet written as documented then fails sign_psbt() and the force-close is never broadcast.
Point implementors at extract_tx_unchecked_fee_rate() instead, and warn against extract_tx() so they don't "fix" it back.
@matt asked:
> @auto-pr-bot can you change the docs to fix this?
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 60/100
This commit only updates documentation comments in LDK's wallet utility code. It tells wallet developers not to use a standard Bitcoin library method (psbt.extract_tx()) when implementing the sign_psbt() function, because that method rejects transactions with very high fees. In certain legitimate Lightning scenarios—like a child transaction paying fees for both itself and its parent force-close transaction—the fee rate can exceed the library's cap. Using the wrong method would cause the wallet to refuse to sign, preventing a force-close transaction from being broadcast. The commit itself does not change any code behavior, only the guidance given to implementers.
Security candidateRelease the monitor-set lock before sync event callbacksby auto-pr-bot · c587b847 · Nov 15, 2026 · 1 fileMessage 91 · StrongModerate 64Details
Commit message · auto-pr-bot
Release the monitor-set lock before sync event callbacks
@matt asked in #5589:
> @auto-pr-bot please fix this issue reported by project loupe > > ## Description > > The synchronous EventsProvider implementation holds > self.monitors.read() throughout each > ChannelMonitor::process_pending_events call, including the application > callback. Both its documentation and EventsProvider explicitly permit > callbacks to re-enter the provider. A callback that flushes a queued > new monitor acquires flush_lock and pending_ops, then > watch_channel_internal waits for self.monitors.write(). The same > thread still owns the outer read guard and cannot release it until the > callback returns, so production deadlocks. The blocked flush also > retains the global operation-queue lock, preventing subsequent > deferred monitor updates. > > [...] > > Exploitation is integration-dependent: an application must use > synchronous event handling and perform a checkpoint/flush from its > event callback (or another operation requiring the monitor-set write > lock). A channel counterparty can trigger that callback through an > on-chain close producing SpendableOutputs, while another registration > is queued. This stalls event processing and monitor-update flushing; > if processing remains stalled, time-sensitive claim handling can be > affected.
`process_pending_events_async` already re-acquires the monitors read lock around each monitor's event processing instead of holding it across the handler; this applies the same structure to the synchronous `EventsProvider` implementation, using the shared `process_events_body!` macro. A regression test queues a monitor registration and flushes it from the event handler, which the test lock checker detects as a deadlock on the previous code.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
explicit security languagefuzzing or regression evidence
AI analysis · Moderate 64/100
This commit fixes a deadlock bug in the rust-lightning library's ChainMonitor. When an application handled certain blockchain events synchronously, the library held a read lock while calling the application's handler. If that handler tried to flush a newly queued channel monitor, it needed a write lock on the same data structure, which the same thread still held as a read lock. This caused a self-deadlock, stalling event processing and time-sensitive on-chain claim handling. The fix releases the read lock before invoking the application callback and re-acquires it afterward, mirroring how the asynchronous event path already worked. A regression test confirms the previously deadlocking scenario now succeeds.
Security candidateUse zero splice min-depth in zero-conf splice reorg testby Matt Corallo · 8bd6e170 · Nov 12, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo
Use zero splice min-depth in zero-conf splice reorg test
`test_zero_conf_splice_stays_locked_when_unconfirmed` relies on a zero-conf splice sending `splice_locked` as soon as it is signed. Since splices on zero-conf channels now wait for `inbound_splice_min_depth` and `outbound_splice_min_depth` (both defaulting to 6), the test's splice no longer locked at signing and it failed waiting for the `splice_locked` message.
The test landed concurrently with the min-depth knobs, so it missed the update applied to the other zero-conf splice tests. Set both knobs to 0 as those tests do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundary
AI analysis · Informational 15/100
This commit only fixes a test that was failing because of a recent unrelated change. It does not change any production code or fix a security issue. The test now explicitly sets two new configuration knobs to zero so the test scenario behaves as originally intended.
Security candidateMerge PR 'Fix HTLC loss when a closed channel's ID is reused in open_channel' (#5562)by Matt Corallo · 7ac88a11 · Nov 11, 2026 · 2 filesMessage 81 · StrongHigh 76Details
Commit message · Matt Corallo
Merge PR 'Fix HTLC loss when a closed channel's ID is reused in open_channel' (#5562)
from auto-pr-bot/bot/254-peer-can-steal-forwarded-htlcs-b-d76f84 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5562 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · High 76/100
This patch fixes a bug in the Lightning Dev Kit where a forwarded payment (HTLC) could be permanently lost if a new channel reused the same temporary ID as a recently closed channel. Previously, the code could look up the new, unfunded channel instead of the closed one, skip writing the payment secret (preimage) to the closed channel's on-chain safety copy (ChannelMonitor), and let the payment expire unclaimed. The fix both rejects incoming channel open attempts that reuse such an ID and ensures claims still reach the correct closed channel's monitor even if an unfunded channel exists under the same ID.
Security candidateMerge PR 'Handle claim replay for payments which reused a payment hash' (#5541)by Matt Corallo · 55ce2abd · Nov 10, 2026 · 3 filesMessage 81 · StrongModerate 58Details
Commit message · Matt Corallo
Merge PR 'Handle claim replay for payments which reused a payment hash' (#5541)
from 2026-11-reused-payment-claim-replay into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5541 Reviewed-by: Val Wallace <val@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 58/100
This commit fixes a bug in the Lightning Dev Kit where the node could confuse two different payments that reused the same payment hash. Previously, completing an old multi-part payment could incorrectly trigger a 'payment received' event for a newer payment, or a restart could fail to replay all owed 'payment received' events. The fix tags each completion action with the payment's unique internal ID so events are only generated for the correct payment.
Security candidateHandle claim replay for payments which reused a payment hashby Matt Corallo · c2020bca · Nov 10, 2026 · 3 filesMessage 85 · StrongModerate 66Details
Commit message · Matt Corallo
Handle claim replay for payments which reused a payment hash
A payment hash may be paid, and claimed, more than once, leaving several claims for it in a `ChannelMonitor`. On `ChannelManager` load we replayed such claims matching them against `claimable_payments` and `pending_claiming_payments` only by payment hash. As a result:
* if the first replayed claim's `PaymentClaimed` was delayed (the channel was closed or had a `ChannelMonitorUpdate` in flight), the second claim's replay found its `pending_claiming_payments` entry and `ChannelManager::read` failed on every startup, * a different, unclaimed, payment with the same payment hash was dropped from `claimable_payments` and reported as claimed without its HTLCs being claimed.
Because a replayed claim is durably in a `ChannelMonitor`, and thus replayed again on the next startup, we don't need to wait on its `ChannelMonitorUpdate`s to generate the `PaymentClaimed`. Thus, we now generate it immediately and no longer track replayed claims in `pending_claiming_payments`. We also only drop a payment from `claimable_payments` if it shares an HTLC with the replayed claim, i.e. it is a stale copy of the claimed payment.
Further, `MonitorUpdateCompletionAction::PaymentClaimed` identified its payment only by payment hash, so an action completing after a different payment with the same payment hash began being claimed generated that payment's `PaymentClaimed` before its preimage was durable. It now carries the claim's `PaymentId` and only generates the event for a matching payment.
Note that a `ChannelManager` reloaded again before its startup `ChannelMonitorUpdate`s complete now generates another redundant preimage update for each closed channel in a replayed claim.
Thanks to Erick Cestari for reporting this issue.
Co-Authored-By: Claude <noreply@anthropic.com>
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
boot or update path
AI analysis · Moderate 66/100
This commit fixes a bug in LDK (a Lightning Network implementation in Rust) where the same payment hash could be used for multiple payments. On restart, the software could either crash repeatedly or incorrectly mark a different, unclaimed payment as already claimed. The fix makes sure each payment is tracked by its unique ID, not just by its payment hash, so claims are replayed correctly after a restart.
from auto-pr-bot/bot/207-bound-channel-handler-gossip-que-30dc42 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5529 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Moderate 52/100
This change prevents a Lightning node from repeatedly broadcasting the same channel announcement if a peer keeps replaying a specific protocol message (announcement_signatures). Before the fix, a malicious or buggy peer could make the node generate and flood fresh channel_announcement broadcasts, wasting bandwidth and gossip buffer space across the network. The patch adds a flag so only the first processed announcement_signatures triggers a broadcast, with one deliberate exception after a node restart to preserve reliability.
Security candidateMerge PR 'Include recovery ID in invoice signature ordering' (#5516)by Matt Corallo · 5653142a · Nov 6, 2026 · 1 fileMessage 86 · StrongLow 42Details
Commit message · Matt Corallo
Merge PR 'Include recovery ID in invoice signature ordering' (#5516)
from tankyleo/leo/ord-bolt11invoicesignature into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5516 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Low 42/100
This change fixes how Lightning invoices are sorted when they contain signatures. Previously, two invoices that differed only by their 'recovery ID' (a small extra number attached to a signature) were treated as equal during sorting. That could cause inconsistent ordering, duplicate entries, or subtle logic bugs in code that relies on sorted invoice collections. The patch now includes the recovery ID in the comparison so signatures are ordered correctly and consistently.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
access controlmerge-commit duplicate discount
AI analysis · Low 35/100
This small patch fixes a state-persistence bug in a Lightning service feature (LSPS2). When a funding transaction or broadcast authorization was recorded, the code forgot to mark the peer's state as needing to be saved to disk. That could let the in-memory change disappear after a restart, potentially causing the node to lose track of money-moving transactions or re-broadcast at the wrong time. It is a reliability/consistency fix rather than an obvious remote exploit.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Moderate 58/100
This patch fixes a place where two numbers representing the size of a Bitcoin transaction input were added together using normal addition, which could silently overflow and wrap around to a tiny value in Rust. By switching to checked addition, the code now treats an overflow as a failure case and falls back to a maximum fee, preventing a malformed or extremely large UTXO from causing an underpriced fee estimate. The practical security impact is moderate: it could let an attacker-provided UTXO slip past a reserve check, but the surrounding code has other safeguards and the scenario requires a very large, crafted satisfaction_weight.