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

rpc: erase empty map entry in removeCommand

Public commit record

What the developer wrote

Authored by will

80/100 · Strong
rpc: erase empty map entry in removeCommand

After removing the last CRPCCommand pointer for a given name,
erase the now-empty vector from mapCommands. Without this,
listCommands() returns the name of a fully removed command
because it iterates mapCommands keys unconditionally.

For example, when unloading the wallet the RPCs are deregistered, and
this prevents getopenrpcinfo from returning non-existant RPCs.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bookkeeping bug in Bitcoin Core's RPC command registry. When a command was fully removed (for example, when a wallet is unloaded), the command's name was still left behind in an internal list. That caused tools like `getopenrpcinfo` and `listCommands` to report commands that no longer actually exist. The fix simply deletes the empty entry so removed commands disappear from listings. There is no direct evidence this can be exploited to steal funds or crash nodes, but it could mislead monitoring tools or client software that relies on the command list.

Recommended action

Apply the patch. Review any RPC clients or monitoring that cache command lists from getopenrpcinfo, since prior versions may briefly expose commands that are no longer loaded. No emergency response is indicated.

Security signals we found

01

Stale/inconsistent internal state in RPC command table

02

Information-discrepancy bug: listCommands/getopenrpcinfo report non-existent RPCs

03

Potential for client confusion or failed RPC calls after dynamic module unload

04

No input validation bypass or memory corruption evident in diff

Risk score

Why this scored 26/100

Our methodology →
Potential impact 4/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 5/15
Confidence 8/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.