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

validation: handle null mempool on delete

Public commit record

What the developer wrote

Authored by Lőrinc

68/100 · Adequate
validation: handle null mempool on delete

Kernel can create a `ChainstateManager` without a mempool.
Deleting an AssumeUTXO chainstate then dereferences the previous chainstate's null mempool pointer.

Allow the previous chainstate to have no mempool, matching `AddChainstate()`.
Cover the reindex/wipe lifecycle.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a crash bug in Bitcoin Core's chainstate manager. When deleting a temporary chainstate used for AssumeUTXO loading, the code assumed every chainstate had a memory pool (mempool) attached. In the 'kernel' library mode, a ChainstateManager can be created without a mempool, so deleting a chainstate dereferenced a null pointer and crashed. The fix simply checks whether the mempool exists before checking its size, and adds a test for this lifecycle.

Recommended action

No immediate user action required; this is a crash fix for an internal API path. Developers using the Kernel API or AssumeUTXO workflows should update to include this commit. Consider backporting to relevant maintenance branches if the Kernel API is exposed.

Security signals we found

01

Null-pointer dereference in validation code path

02

Crash/assertion failure during chainstate deletion

03

AssumeUTXO / kernel-specific code path affected

04

Defensive null check added to existing assertion

Risk score

Why this scored 32/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 4/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.