Skip to content

[31.x] validation: correct lifetime of precomputed tx data - #35210

Merged
fanquake merged 1 commit into
bitcoin:31.xfrom
darosior:2605_cleanup_CVE-2024-52911_v31
May 7, 2026
Merged

fanquake merged 1 commit into
bitcoin:31.xfrom
darosior:2605_cleanup_CVE-2024-52911_v31

Conversation

@darosior

@darosior darosior commented May 5, 2026

Copy link
Copy Markdown
Member

This backports #35209 to the version 31 branch.

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.

Github-Pull: bitcoin#35209
Rebased-From: 1ed799f
@DrahtBot

DrahtBot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35210.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK fanquake

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@fanquake fanquake added this to the 31.1 milestone May 5, 2026
@fanquake fanquake changed the title 31.x backport: validation: correct lifetime of precomputed tx data [31.x] validation: correct lifetime of precomputed tx data May 5, 2026
@DrahtBot

DrahtBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task i686, no IPC: https://github.com/bitcoin/bitcoin/actions/runs/25375874032/job/74411256296
LLM reason (✨ experimental): CI failed because the sock_tests CTest case failed (ctest: 1 test failed, exit status 8).

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@fanquake

fanquake commented May 7, 2026

Copy link
Copy Markdown
Member

ACK 0cedd6a

@fanquake
fanquake merged commit 24bfb2c into bitcoin:31.x May 7, 2026
76 of 78 checks passed
@marcofleon marcofleon mentioned this pull request May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants