feat(core/bootloader): start the device on short press
What changed, and why it matters
This commit changes how a Trezor hardware wallet starts up when you press its button. Previously, the device would only fully power on after a long button press (about one second) or when in a special factory mode. After this change, a short button press is enough to start the device in normal use. The change also adds a small haptic buzz at 500 milliseconds to give the user feedback. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a user-experience or behavior change in the bootloader.
Treat as a normal firmware behavior change rather than a security patch. If reviewing for security, verify that allowing short-press boot does not introduce unintended startup paths (for example, accidental power-on, glitch conditions, or interaction with secure-boot / bootloader-lock mechanisms). Request a security note from the vendor if one is not already available.
Security signals we found
Behavior change in bootloader button-press handling
Removal of manufacturing-mode gating for short-press startup
No mention of vulnerability, CVE, or security fix in commit message
No changelog entry provided
Evidence from the diff
The patch modifies core/embed/projects/bootloader/main.c. It removes the manufacturing_mode parameter from boot_sequence() and changes the startup logic so that turn_on_locked is set to true as soon as the button is pressed, rather than after a long press or only in manufacturing mode. A short press now triggers device startup. A new haptic_played flag is introduced to play a haptic feedback event at 500 ms. The previous 1000 ms threshold for turn_on_locked is removed. The commit does not describe a security bug and no advisory or CVE is referenced.
Changed components
Trezor Core bootloadercore/embed/projects/bootloader/main.cButton press / power-on logicInspect captured patch +9 / −8
diff --git a/core/embed/projects/bootloader/main.c b/core/embed/projects/bootloader/main.c
index 2ad687d7..d5c9238f 100644
--- a/core/embed/projects/bootloader/main.c
+++ b/core/embed/projects/bootloader/main.c
@@ -117,7 +117,7 @@ static secbool is_manufacturing_mode(vendor_header *vhdr) {
return manufacturing_mode;
}
-static secbool boot_sequence(secbool manufacturing_mode) {
+static secbool boot_sequence(void) {
secbool stay_in_bootloader = secfalse;
#ifdef USE_BACKUP_RAM
@@ -149,7 +149,7 @@ static secbool boot_sequence(secbool manufacturing_mode) {
(cmd == BOOT_COMMAND_INSTALL_UPGRADE || cmd == BOOT_COMMAND_REBOOT ||
cmd == BOOT_COMMAND_SHOW_RSOD || cmd == BOOT_COMMAND_STOP_AND_WAIT);
- if (sectrue == manufacturing_mode && cmd != BOOT_COMMAND_POWER_OFF) {
+ if (cmd != BOOT_COMMAND_POWER_OFF) {
turn_on = true;
}
@@ -159,6 +159,7 @@ static secbool boot_sequence(secbool manufacturing_mode) {
uint32_t press_start = 0;
bool turn_on_locked = false;
+ bool haptic_played = false;
bool bld_locked = false;
while (!turn_on) {
@@ -166,7 +167,7 @@ static secbool boot_sequence(secbool manufacturing_mode) {
if (btn_down) {
if (press_start == 0) {
press_start = systick_ms();
- turn_on_locked = false;
+ turn_on_locked = true;
bld_locked = false;
}
@@ -176,13 +177,13 @@ static secbool boot_sequence(secbool manufacturing_mode) {
haptic_play(HAPTIC_BOOTLOADER_ENTRY);
#endif
bld_locked = true;
- } else if ((elapsed >= 1000 || manufacturing_mode == sectrue) &&
- !turn_on_locked) {
+ }
#ifdef USE_HAPTIC
+ else if (elapsed >= 500 && !haptic_played) {
haptic_play(HAPTIC_BUTTON_PRESS);
-#endif
- turn_on_locked = true;
+ haptic_played = true;
}
+#endif
} else if (press_start != 0) {
// Button just released
if (bld_locked) {
@@ -460,7 +461,7 @@ int bootloader_main(void) {
secbool manufacturing_mode = is_manufacturing_mode(&vhdr);
- secbool stay_in_bootloader = boot_sequence(manufacturing_mode);
+ secbool stay_in_bootloader = boot_sequence();
drivers_init(manufacturing_mode, &touch_initialized);
Why this scored 15/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.