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

validation: correct lifetime of precomputed tx data

Public commit record

What the developer wrote

Authored by Antoine Poinsot

98/100 · Strong
validation: correct lifetime of precomputed tx data

This makes sure `txsdata` always outlives the Script check queue (since local
objects are destructed in reverse order of construction).

This is the root cause for a security vulnerability reported by Cory Fields in
2024 that could be exploited by crafting an invalid block to cause nodes to
read freed memory. The vulnerability was covertly fixed in commit
`492e1f09943fcb6145c21d470299305a19e17d8b`.

See security advisory for CVE-2024-52911 for more details.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a memory safety bug in Bitcoin Core's block validation. When checking a new block, the program creates a queue of script checks that may run on multiple threads in the background. It also precomputes some transaction data used by those checks. Previously, the precomputed data was destroyed before the background check queue finished, so the workers could read memory that had already been freed. An attacker could craft a malicious block to trigger this, potentially causing crashes, memory corruption, or worse. The fix simply moves the precomputed data variable so it is created before the queue and destroyed after it, guaranteeing the data stays alive as long as the checks need it.

Recommended action

Apply this reordering fix and ensure all supported release branches include it. Node operators should upgrade to a release containing this commit. Because the commit message states the vulnerability was already covertly fixed in 492e1f09943fcb6145c21d470299305a19e17d8b, verify whether this commit is a backport or a public disclosure follow-up and coordinate with the CVE-2024-52911 advisory for release notes and upgrade guidance.

Security signals we found

01

Use-after-free in block validation path

02

Lifetime/order-of-destruction bug between local objects

03

Exploitable by crafted invalid block

04

Remote, unauthenticated network-triggered memory corruption

05

CVE-2024-52911 referenced by vendor commit message

06

Earlier covert fix acknowledged in commit message

Risk score

Why this scored 87/100

Our methodology →
Potential impact 28/30
Exploitability 20/25
Stealth signal 12/15
Affected reach 13/15
Confidence 9/10
Evidence quality 5/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.