fix(core): fix unit_properties_init in prodtest
What changed, and why it matters
This commit moves a function call (unit_properties_init) so it runs earlier during the startup of a special factory-testing program called prodtest, instead of only when Bluetooth support is enabled. The change is in a low-level embedded file used during hardware production testing, not the normal wallet firmware users run. The commit message says it is a fix but gives no details about any security impact, and no independent security references were provided.
Treat as a routine prodtest bug fix unless additional context shows the mis-ordered initialization caused a security-relevant failure. Review unit_properties_init to confirm it only reads boardloader capabilities and does not expose secrets or alter security-critical state. No urgent user action is indicated.
Security signals we found
Change in low-level embedded initialization order
Function moved from conditional BLE path to common driver init
No changelog entry provided
No security explanation in commit message
Evidence from the diff
In core/embed/projects/prodtest/main.c, the include for util/unit_properties.h was removed from inside the USE_BLE block, and unit_properties_init() was moved from the BLE-conditional initialization path into the common drivers_init() routine, immediately after parse_boardloader_capabilities(). This ensures unit properties are initialized unconditionally and earlier, before RTC, display, random, USB, BLE, and other driver init. The patch is small (+2/-2) and does not show what bug the relocation fixes.
Changed components
core/embed/projects/prodtest/main.cprodtest factory/production test firmwareInspect captured patch +2 / −2
diff --git a/core/embed/projects/prodtest/main.c b/core/embed/projects/prodtest/main.c
index d0cade1b5..6c36812b7 100644
--- a/core/embed/projects/prodtest/main.c
+++ b/core/embed/projects/prodtest/main.c
@@ -98,7 +98,6 @@
#ifdef USE_BLE
#include <io/ble.h>
-#include <util/unit_properties.h>
#include "cmd/prodtest_ble.h"
#endif
@@ -146,6 +145,8 @@ void prodtest_disable_rgbled_control(void) { g_rgbled_control_disabled = true; }
static void drivers_init(void) {
parse_boardloader_capabilities();
+ unit_properties_init();
+
#ifdef USE_RTC
rtc_init();
#endif
@@ -187,7 +188,6 @@ static void drivers_init(void) {
rgb_led_init();
#endif
#ifdef USE_BLE
- unit_properties_init();
ble_init();
#endif
#ifdef USE_TROPIC
Why this scored 23/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.