chore(core) ensure success of tropic_init for emulator
What changed, and why it matters
This change makes the Trezor software emulator stop with a clear error message if a component called 'tropic' fails to initialize, instead of silently continuing. It is a hardening improvement for the emulator build, not a fix for a known exploitable vulnerability in real devices.
Treat as a minor hardening commit. No urgent action required; include in normal review and testing of emulator builds. Verify that tropic_init failures during emulator startup now produce a clear error and do not mask unrelated startup issues.
Security signals we found
Silent failure condition converted to explicit halt
Defensive hardening of emulator initialization path
No evidence of memory corruption, privilege escalation, or device attack path in the diff
Evidence from the diff
In core/embed/projects/unix/main.c, the call to tropic_init() in drivers_init() is wrapped with the ensure() macro, which halts execution if tropic_init returns false. Previously, a failed initialization was ignored. This only affects the Unix emulator build (USE_TROPIC) and converts a silent failure into an explicit, observable panic.
Changed components
core/embed/projects/unix/main.cTrezor firmware Unix emulatorTropic secure-element initialization pathInspect captured patch +2 / −1
diff --git a/core/embed/projects/unix/main.c b/core/embed/projects/unix/main.c
index dfb8199e5..929ea8a73 100644
--- a/core/embed/projects/unix/main.c
+++ b/core/embed/projects/unix/main.c
@@ -530,7 +530,8 @@ void drivers_init(uint16_t tropic_model_port) {
#endif
#ifdef USE_TROPIC
- tropic_init(tropic_model_port);
+ ensure(tropic_init(tropic_model_port) ? sectrue : secfalse,
+ "tropic initialization failed");
#endif
usb_configure(NULL);
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.