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

multiwithdraw: use unique ids on requests.

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
multiwithdraw: use unique ids on requests.

Shades of `efacada7ddf` which did the same thing in multifundchannel:
(ab)used the id, which being a string, gave and id of 34 (").

Also clean up the leftover assert in multifundchannel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This patch fixes a bug in the multiwithdraw plugin where it reused the JSON-RPC command ID as its own internal request identifier. Because command IDs can be arbitrary strings (for example, a double-quote character becomes the number 34), using them directly as numeric IDs could cause collisions or confusion when tracking multiple in-flight withdrawal requests. The fix introduces a private global counter so each multiwithdraw request gets a unique numeric ID, matching an earlier fix made to the multifundchannel plugin. The patch also removes a leftover debug assertion in multifundchannel.

Recommended action

Apply the patch. Review other plugins for the same anti-pattern of dereferencing cmd->id as a numeric identifier. Consider adding regression tests that exercise multiwithdraw with string, numeric, and special-character JSON-RPC ids to ensure unique internal tracking.

Security signals we found

01

Use of attacker-influenced pointer/value as internal identifier (CWE-20 / CWE-99 style logic error)

02

Potential ID collision / request confusion in multiwithdraw plugin

03

Removal of leftover assertion in related plugin

04

Pattern repeat of a prior fix (efacada7ddf) indicating a known bug class

Risk score

Why this scored 42/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 6/15
Confidence 6/10
Evidence quality 3/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.