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

feat(core): app root packet downgrade protection

Public commit record

What the developer wrote

Authored by cepetr

57/100 · Thin
feat(core): app root packet downgrade protection

[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 adds downgrade protection for a new 'app root packet' system in Trezor firmware. Previously, the code had a TODO note saying downgrade protection needed to be considered. The change makes the device remember the timestamps of previously accepted root packets and reject older or inconsistent ones. It also adds a new Python-exposed state object so the wallet software can persist these timestamps. This is a security-hardening feature rather than a fix for a currently exploitable bug, but it closes a design gap that could have allowed an attacker to roll back trusted application lists to older, potentially vulnerable versions.

Recommended action

Review the storage lifecycle of AppRootState to ensure it cannot be reset or erased by untrusted code, which would re-enable downgrade. Verify that the 90-day ROOT_PACKET_MAX_DRIFT and the contiguous ring_mask policy match the intended trust model. Confirm that all callers of app_root_update() (including tests and emulators) have been updated to pass and persist the new state object. Consider whether an explicit monotonic counter or secure storage binding is needed instead of relying solely on caller-persisted timestamps.

Security signals we found

01

Replaces a TODO comment ('!@# TODO: Consider downgrade protection') with concrete timestamp-based anti-downgrade checks

02

Adds per-ring timestamp state to prevent rollback of root-of-trust packets

03

Adds chain_timestamp field and 90-day drift bound to root packet format

04

Adds contiguous ring_mask validation to prevent non-contiguous ring selections

05

Extends syscall ABI and adds write-access verification for the new state argument

06

Adds MicroPython wrapper for persisting root packet state

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/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.