oled: hold display in reset during startup
What changed, and why it matters
This commit fixes a display behavior issue during startup of the BitBox02 hardware wallet. Previously, when the device turned on, the screen's reset pin was left in a state that could allow leftover images or text from an earlier session to briefly appear at low brightness before the device finished booting. The change ensures the screen is kept fully blank (held in reset) until the firmware is ready to draw a clean screen. This is a defensive fix to prevent a user from seeing stale or misleading information during boot.
Treat as a low-severity hardening fix. Review whether other display-control signals (e.g., PIN_OLED_ON) have similar sequencing issues, and confirm that `oled_init()` reliably clears the framebuffer before releasing reset. No urgent user action is required.
Security signals we found
Information disclosure via residual display content during boot
OLED reset pin sequencing hardening
Defense against stale/misleading UI state before verified firmware initializes display
Evidence from the diff
In src/platform/driver_init.c, the _oled_set_pins() function now drives PIN_OLED_RES low before configuring it as an output, and leaves it low until oled_init() later releases reset and uploads a cleared framebuffer. Previously the pin was configured as an output and then driven high, which could leave the OLED controller out of reset while the boost converter was disabled. That state can cause prior framebuffer content to remain faintly visible. The patch is a one-line logical reordering plus a comment; it is partial in that it only addresses the reset sequencing and does not change stage0/stage1 verification logic.
Changed components
src/platform/driver_init.cOLED display driver initializationBitBox02 boot sequenceInspect captured patch +2 / −1
### src/platform/driver_init.c
@@ -314,8 +314,9 @@ static void _oled_set_pins(void)
gpio_set_pin_level(PIN_OLED_ON, PIN_LOW);
gpio_set_pin_function(PIN_OLED_ON, GPIO_PIN_FUNCTION_OFF);
+ // Hold the OLED in reset until oled_init() releases it to prevent showing stale content.
+ gpio_set_pin_level(PIN_OLED_RES, PIN_LOW);
gpio_set_pin_direction(PIN_OLED_RES, GPIO_DIRECTION_OUT);
- gpio_set_pin_level(PIN_OLED_RES, PIN_HIGH);
gpio_set_pin_function(PIN_OLED_RES, GPIO_PIN_FUNCTION_OFF);
gpio_set_pin_direction(PIN_OLED_CMD, GPIO_DIRECTION_OUT);Why this scored 35/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.