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

fix(core): fix OOB read in read_vendor_header

Public commit record

What the developer wrote

Authored by tychovrahe

57/100 · Thin
fix(core): fix OOB read in read_vendor_header

[no changelog]
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes an out-of-bounds memory read bug in the Trezor bootloader's firmware header parser. The read_vendor_header function previously trusted size values inside a firmware file without first checking whether those sizes fit within the actual data buffer. A malformed firmware update or a corrupted on-device firmware image could have caused the bootloader to read memory beyond the allowed region. The patch adds size checks so the parser rejects too-small or oversized headers before using their contents.

Recommended action

Treat this as a security fix and include it in release notes or a security advisory. Users should update bootloader/firmware to a release containing this commit. Developers should audit other parsers that consume external length fields to ensure similar bounds checks are present.

Security signals we found

01

Out-of-bounds read in bootloader firmware-header parser

02

Untrusted length field (hdrlen, vsig_n) used without buffer-size validation

03

Signature offset could underflow when hdrlen < IMAGE_SIG_SIZE

04

Call-site changes propagate a new size parameter, indicating a systemic trust-boundary fix

05

Bootloader and bootloader_ci firmware-update paths are affected

Risk score

Why this scored 74/100

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