From a3b67889677f90b6beb56ede1ab22e682107dbdc Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Fri, 7 Jun 2024 11:03:18 +0200 Subject: [PATCH] fix(core): fix bootloader unlock check on STM32U5, fw only [no changelog] (cherry picked from commit 5a8989f00dd6cab9e6303251ac1d81eab03a1002) --- core/.changelog.d/3922.fixed | 1 + core/embed/trezorhal/stm32u5/secret.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 core/.changelog.d/3922.fixed diff --git a/core/.changelog.d/3922.fixed b/core/.changelog.d/3922.fixed new file mode 100644 index 0000000000..d79a37945b --- /dev/null +++ b/core/.changelog.d/3922.fixed @@ -0,0 +1 @@ +[T3T1] Fixed device authenticity check diff --git a/core/embed/trezorhal/stm32u5/secret.c b/core/embed/trezorhal/stm32u5/secret.c index 1f9622120d..ef2a096dc9 100644 --- a/core/embed/trezorhal/stm32u5/secret.c +++ b/core/embed/trezorhal/stm32u5/secret.c @@ -38,7 +38,7 @@ secbool secret_ensure_initialized(void) { secbool secret_bootloader_locked(void) { #ifdef FIRMWARE - return TAMP->BKP8R != 0 * sectrue; + return (TAMP->BKP8R != 0) * sectrue; #else return sectrue; #endif