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

refactor(core/bootloader): commit the firmware version separately from checking it [no changelog]

Public commit record

What the developer wrote

Authored by tychovrahe

95/100 · Strong
refactor(core/bootloader): commit the firmware version separately from checking it [no changelog]

fw_check() committed the header's monotonic version to the rollback
counter as a side effect, before it verified the image contents. Every
status query that called it wrote to the device: GetFeatures over the
wire, and now the debug link too, which is serviced during an upload
when the image in flash is half-written.

fw_check() is read-only now and reports version_trusted and monotonic
in its result; the boot path commits them through fw_commit_min_version()
right after the check, under the same condition and at the same point
as before. The pre-jump re-verification keeps its own commit. The update
flow never committed, so after an install the version is committed by
the reboot that follows, as it always was when the host sent no
GetFeatures in between.

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

What changed, and why it matters

This bootloader change fixes a side effect where simply asking the device for its status could permanently change a security counter on the device. Before, a routine called fw_check() both inspected the firmware and updated the rollback counter. Now the inspection is read-only, and the actual update is done only at deliberate points such as booting. This prevents a half-written firmware update or a status query from locking the device to a version before the firmware is fully verified and installed.

Recommended action

Treat this as a security-hardening fix and include it in the next bootloader release. Review other bootloader paths that call fw_check() to confirm none still expect the old commit side effect. Verify that the pre-jump re-verification commit and post-reboot commit cover all intended rollback-counter update cases.

Security signals we found

01

Rollback counter was written before image contents were verified

02

Status queries during firmware upload could commit a monotonic version while flash image was half-written

03

Separation of read-only verification from state-mutating commit

04

Debug link path newly exposed the side effect during upload

05

Glitch protection backup field present but unchanged

Risk score

Why this scored 63/100

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