fix(core): temporary fix for RSOD triggered by rng_fill_buffer_strong
What changed, and why it matters
This commit is a temporary hotfix that disables the Tropic secure-element randomness source in non-production builds to stop a Red Screen of Death (RSOD) crash triggered by the function rng_fill_buffer_strong. The change wraps the Tropic random-buffer mixing step in a PRODUCTION preprocessor guard, so it only runs in production firmware. In non-production/debug builds, the function will fall back to whatever other entropy sources remain (likely the STM32 hardware RNG plus optional optiga mixing). The commit message explicitly calls this a temporary fix and says to delete it later, so it is a workaround rather than a root-cause fix. There is no direct evidence in the commit that this is exploitable, but any change to cryptographic randomness generation in a hardware wallet is a security-sensitive signal.
Treat this as a security-relevant workaround that needs follow-up. The vendor should: (1) root-cause why tropic_random_buffer triggers an RSOD in non-production builds, (2) ensure that disabling Tropic entropy does not weaken randomness below the required security level in any shipped configuration, (3) replace this temporary guard with a proper fix, and (4) document the change in the changelog. Independent reviewers should verify that non-production builds still receive sufficient entropy and that production builds are not affected by the same underlying failure mode.
Security signals we found
Change affects a cryptographic randomness function (rng_fill_buffer_strong) used for secure operations.
A hardware-wallet secure-element entropy source (Tropic) is conditionally disabled outside production builds.
Commit is explicitly labeled as a temporary/hotfix workaround, not a complete fix.
No changelog entry, reducing traceability of the change.
RSOD (crash) indicates a reliability/availability issue in the RNG path.
Evidence from the diff
In core/embed/sec/rng/rng_common.c, the rng_fill_buffer_strong() function fills a buffer by XORing entropy from multiple sources. The diff wraps the USE_TROPIC block (which calls tropic_random_buffer and XORs its output) inside #if PRODUCTION … #endif. In non-production builds, the Tropic source is skipped entirely. The commit title says this is a temporary fix for an RSOD triggered by rng_fill_buffer_strong, and the inline comment says ‘// HOTFIX – DELETE IT –‘. The change is +2/-0 lines, purely conditional compilation. No root cause for the RSOD is explained, and no other references are supplied.
Changed components
core/embed/sec/rng/rng_common.crng_fill_buffer_strong()Tropic secure-element RNG integration (USE_TROPIC)Trezor Core firmware build configurations (PRODUCTION vs non-production)Inspect captured patch +2 / −0
diff --git a/core/embed/sec/rng/rng_common.c b/core/embed/sec/rng/rng_common.c
index aea66e13..883352fc 100644
--- a/core/embed/sec/rng/rng_common.c
+++ b/core/embed/sec/rng/rng_common.c
@@ -55,6 +55,7 @@ bool rng_fill_buffer_strong(void* buffer, size_t buffer_size) {
dst[i] ^= block[i];
}
#endif
+#if PRODUCTION // // HOTFIX -- DELETE IT --
#ifdef USE_TROPIC
if (!tropic_random_buffer(block, block_size)) {
return false;
@@ -63,6 +64,7 @@ bool rng_fill_buffer_strong(void* buffer, size_t buffer_size) {
for (size_t i = 0; i < block_size; i++) {
dst[i] ^= block[i];
}
+#endif
#endif
dst += block_size;
remaining -= block_size;
Why this scored 44/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.