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

wallet, bdbro: Enforce overflow data lengths

Public commit record

What the developer wrote

Authored by Ava Chow

73/100 · Adequate
wallet, bdbro: Enforce overflow data lengths

The total length of the data in an overflow record is being given to us.
We should validate that the length is reasonable (fits in the total size
of the file), and to stop reading additional data if the amount of data
read exceeds the stated legnth. This prevents infinite looping behavior.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This patch fixes a bug in Bitcoin Core's wallet migration code that reads old Berkeley DB wallet files. A malformed wallet file could claim an overflow data record was extremely long, causing the software to loop through pages forever. The fix checks that the claimed length fits within the actual file size and stops reading if the collected data exceeds that claimed length. This prevents a denial-of-service via infinite loop when opening a crafted wallet file.

Recommended action

Users who migrate old Berkeley DB wallets should upgrade to a release containing this commit. Treat any wallet file from an untrusted source as potentially malicious and avoid running migration on it. Developers should ensure similar length validations exist for other record types and page chains in the BDB parser.

Security signals we found

01

Unbounded loop / potential infinite loop on attacker-controlled file input

02

Missing validation of length field parsed from binary file format

03

Denial-of-service vector in wallet migration path

04

Input validation hardening for Berkeley DB read-only parser

Risk score

Why this scored 60/100

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