What changed, and why it matters
This commit fixes a bug in how the Trezor hardware wallet disables Bluetooth (BLE). Previously, when BLE was turned off, the function returned early and never updated the internal 'enabled' state flag. That could leave the system believing BLE is still on, potentially causing unexpected behavior, power drain, or confusion about whether the wireless radio is active. The fix removes the early return so the state flag is always set correctly.
Treat as a functional bug fix with possible security side effects. Review whether the stale `drv->enabled` state could be exploited to keep BLE active when the user believes it is disabled, or to bypass pairing/visibility controls. No immediate emergency response is indicated by the diff alone, but the fix should be included in the next firmware release and tested for correct BLE on/off state transitions.
Security signals we found
State inconsistency between actual hardware state and driver state flag
Early return bypassing state synchronization
Bluetooth/BLE power and pairing lifecycle bug
Evidence from the diff
In ble_set_enabled(bool enabled), when enabled is false, ble_switch_off() was called but followed by an immediate return, skipping the drv->enabled = enabled; assignment. This left drv->enabled stale (likely true) after disabling BLE. The patch removes the return so the state update always executes. The security relevance is indirect: stale state can lead to inconsistent BLE lifecycle management, possibly keeping the radio in an unexpected state or causing subsequent enable/disable calls to behave incorrectly.
Changed components
core/embed/io/ble/stm32/ble.cBLE driver state management on STM32-based Trezor devicesInspect captured patch +0 / −1
diff --git a/core/embed/io/ble/stm32/ble.c b/core/embed/io/ble/stm32/ble.c
index fe3518abd..38bad522d 100644
--- a/core/embed/io/ble/stm32/ble.c
+++ b/core/embed/io/ble/stm32/ble.c
@@ -1353,7 +1353,6 @@ void ble_set_enabled(bool enabled) {
if (!enabled) {
ble_switch_off();
- return;
}
drv->enabled = enabled;
Why this scored 34/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.