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

fix(core): flash F4 firmware parts to their own addresses

Public commit record

What the developer wrote

Authored by tychovrahe

85/100 · Strong
fix(core): flash F4 firmware parts to their own addresses

- split the F4 firmware upload image into part 1 and part 2 when
flashing or combining, part 2 belongs at FIRMWARE_P2_START
- writing it in one piece put part 2 over the secret sector
- fix the misleading split_pad_to comment

[no changelog]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Trezor's internal firmware flashing tools. Previously, when flashing or combining firmware for STM32F4-based devices, the second half of the firmware image was written to the wrong flash address (0x08100000) and could overwrite the 'secret sector'—a protected area that holds sensitive device secrets. The fix splits the firmware image into two parts and writes part 2 to its correct address (0x08120000). The bug is in developer/flash tooling, not in the device firmware itself, so ordinary users are not directly affected unless they use these internal tools.

Recommended action

Treat this as a security-relevant tooling fix. Verify that any prior STM32F4 firmware flashes performed with the affected xtask tooling did not corrupt or overwrite the secret sector. Review internal CI/release pipelines that use `xtask flash` or `xtask combine` for F4 devices. No end-user device update is required, but developers should adopt the patched tooling immediately.

Security signals we found

01

Incorrect flash address caused firmware part 2 to overwrite the secret sector

02

Fix explicitly relocates part 2 to FIRMWARE_P2_START (0x08120000)

03

Tooling-only fix; no runtime device firmware change

04

New validation ensures combined image fits within P1+P2 bounds

05

OpenOCD flash instructions now support multiple segments per session

Risk score

Why this scored 57/100

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