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

Merge remote-tracking branch 'agent/benma-agent/stage0-install-auth'

Public commit record

What the developer wrote

Authored by Marko Bencun

55/100 · Thin
Merge remote-tracking branch 'agent/benma-agent/stage0-install-auth'
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Names security-relevant behavior explicitly! No meaningful explanatory body
The short version

What changed, and why it matters

This commit hardens the BitBox02 bootloader's stage0 code against fault-injection attacks during firmware updates. It adds a new authorization check that re-verifies the installed firmware image and ensures a glitch cannot trick the device into installing an older, invalid, or attacker-chosen update. The change also prevents the compiler from optimizing away safety checks. Pre-built stage0 bootloader binaries were regenerated, and unit tests were added for the new logic.

Recommended action

Treat this as a security-hardening fix for the bootloader update path. Review whether the new `stage0_install_auth()` logic fully covers downgrade and recovery scenarios, and verify that the regenerated stage0 binaries match the source code and are reproducibly built. Consider whether prior firmware versions need a security advisory if a fault-injection downgrade was practically exploitable before this patch.

Security signals we found

01

New authorization gate `stage0_install_auth()` before bootloader update installation

02

Re-verification of installed stage1 image before update to detect fault-induced mismatches

03

Use of `__attribute__((noinline, noclone))` to protect security-critical functions from LTO optimization

04

Use of `volatile` on `update_ok` and `install_auth` to prevent compiler assumption of success after fault-bypassed branch

05

Comment explicitly describes fault-injection threat model: 'A fault can bypass the branch below even when update verification failed'

06

Unit tests enumerate non-canonical `secbool_u32` values, indicating awareness of faulted return codes

07

Pre-built stage0 bootloader binaries regenerated, implying this is a shipped fix

Risk score

Why this scored 72/100

Our methodology →
Potential impact 24/30
Exploitability 14/25
Stealth signal 11/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.