AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 40 Bitcoin

rpcserver: use protocol max for fundMax, not maxChanSize

Public commit record

What the developer wrote

Authored by Yash Bhutwala

81/100 · Strong
rpcserver: use protocol max for fundMax, not maxChanSize

The maxChanSize config option is documented to only apply to incoming
channel requests. However, when using fundMax with OpenChannel, the code
was incorrectly using maxChanSize as the upper bound for the outgoing
channel size.

This commit fixes the issue by using the protocol-level maximum
(MaxBtcFundingAmount or MaxBtcFundingAmountWumbo depending on wumbo
support) as the upper bound for fundMax operations.

Fixes #10468.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This fix corrects a bug in LND's OpenChannel RPC when the 'FundMax' option is used. Previously, the code wrongly used a configuration setting meant only for incoming channels (maxChanSize) as the upper limit for outgoing channels opened with FundMax. Now it uses the proper protocol-level maximum, which prevents users from accidentally being limited to a smaller channel size than the network actually allows. This is a correctness/availability issue rather than a direct theft-of-funds vulnerability, but it could cause unexpected channel-opening behavior or failed transactions.

Recommended action

Review whether any node operators relied on MaxChanSize to limit outgoing FundMax channels as an implicit policy control; if so, document or add an explicit outgoing limit. Otherwise, apply the patch and include it in the next release notes as a bug fix.

Security signals we found

01

Logic error: wrong constant used as upper bound for FundMax

02

Configuration option applied to outgoing flow contrary to documentation

03

Fix moves wumbo feature detection earlier and reuses it consistently

04

No input validation bypass or buffer overflow; issue is policy/correctness

Risk score

Why this scored 40/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 6/15
Affected reach 8/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.