Skip to content

Commit 0591b1c

Browse files
committed
bump version to 7.3.2 and update bootloader hashes
1 parent 68575a7 commit 0591b1c

File tree

6 files changed

+35
-3
lines changed

6 files changed

+35
-3
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.7.2)
22

33
project(KeepKeyFirmware
44

5-
VERSION 7.3.1
5+
VERSION 7.3.2
66

77
LANGUAGES C CXX ASM)
88

include/keepkey/board/check_bootloader.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ extern char bl_hash_v1_1_0[32];
4040
extern char bl_hash_v2_0_0[32];
4141
extern char bl_hash_v2_1_0[32];
4242
extern char bl_hash_v2_1_1[32];
43+
extern char bl_hash_v2_1_2[32];
44+
extern char bl_hash_v2_1_3[32];
45+
extern char bl_hash_v2_1_4[32];
4346

4447
typedef enum _BootloaderKind {
4548
BLK_UNKNOWN,
@@ -53,7 +56,10 @@ typedef enum _BootloaderKind {
5356
BLK_v1_1_0,
5457
BLK_v2_0_0,
5558
BLK_v2_1_0,
56-
BLK_v2_1_1
59+
BLK_v2_1_1,
60+
BLK_v2_1_2,
61+
BLK_v2_1_3,
62+
BLK_v2_1_4
5763
} BootloaderKind;
5864

5965
BootloaderKind get_bootloaderKind(void);

lib/board/check_bootloader.c

+15
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ char bl_hash_v2_1_0[32] =
8787
char bl_hash_v2_1_1[32] =
8888
"\xa3\xf8\xc7\x45\xff\x33\xcd\x92\xa7\xe9\x5d\x37\xc7\x6c\x65\x52\x3d\x25"
8989
"\x8a\x70\x35\x2e\xa4\x4a\x23\x20\x38\xec\x4e\xc3\x8d\xea";
90+
char bl_hash_v2_1_2[32] =
91+
"\x3b\x97\x59\x6e\xd6\x12\xaa\x29\xa7\x4a\x7f\x51\xf3\x3e\xa8\x5f\xd6\xe0"
92+
"\xcf\xe7\x34\x0d\xfb\xb9\x6f\x0c\x17\x07\x7b\x36\x34\x98";
93+
char bl_hash_v2_1_3[32] =
94+
"\xe6\x68\x5a\xb1\x48\x44\xd0\xa3\x81\xd6\x58\xd7\x7e\x13\xd6\x14\x5f\xe7"
95+
"\xae\x80\x46\x9e\x5a\x53\x60\x21\x0a\xe9\xc3\x44\x7a\x77";
96+
char bl_hash_v2_1_4[32] =
97+
"\xfe\x98\x45\x4e\x7e\xbd\x4a\xef\x4a\x6d\xb5\xbd\x4c\x60\xf5\x2c\xf3\xf5"
98+
"\x8b\x97\x42\x83\xa7\xc1\xe1\xfc\xc5\xfe\xa0\x2c\xf3\xeb";
9099

91100
BootloaderKind get_bootloaderKind(void) {
92101
static uint8_t bl_hash[SHA256_DIGEST_LENGTH];
@@ -103,6 +112,12 @@ BootloaderKind get_bootloaderKind(void) {
103112

104113
if (0 == memcmp(bl_hash, bl_hash_v2_1_1, 32)) return BLK_v2_1_1;
105114

115+
if (0 == memcmp(bl_hash, bl_hash_v2_1_2, 32)) return BLK_v2_1_2;
116+
117+
if (0 == memcmp(bl_hash, bl_hash_v2_1_3, 32)) return BLK_v2_1_3;
118+
119+
if (0 == memcmp(bl_hash, bl_hash_v2_1_4, 32)) return BLK_v2_1_4;
120+
106121
// Hotpatched bootloaders
107122
// ----------------------
108123
if (0 == memcmp(bl_hash, bl_hash_v1_0_0_hotpatched, 32)) return BLK_v1_0_0;

lib/board/keepkey_flash.c

+3
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ const char *flash_programModel(void) {
283283
case BLK_v2_0_0:
284284
case BLK_v2_1_0:
285285
case BLK_v2_1_1:
286+
case BLK_v2_1_2:
287+
case BLK_v2_1_3:
288+
case BLK_v2_1_4:
286289
return "No Model";
287290
case BLK_UNKNOWN:
288291
return "Unknown";

tools/blupdater/main.c

+3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ static bool unknown_bootloader(void) {
153153
case BLK_v2_0_0:
154154
case BLK_v2_1_0:
155155
case BLK_v2_1_1:
156+
case BLK_v2_1_2:
157+
case BLK_v2_1_3:
158+
case BLK_v2_1_4:
156159
return false;
157160
}
158161

tools/firmware/keepkey_main.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,12 @@ static void check_bootloader(void) {
135135
case BLK_v1_0_4:
136136
case BLK_v1_1_0:
137137
case BLK_v2_0_0:
138+
// The security issue with bootloaders 2.1.0 - 2.1.3 is just that no one
139+
// should actually have them -- they were internal release candidate builds.
138140
case BLK_v2_1_0:
141+
case BLK_v2_1_1:
142+
case BLK_v2_1_2:
143+
case BLK_v2_1_3:
139144
#ifndef DEBUG_ON
140145
update_bootloader();
141146
#endif
@@ -145,7 +150,7 @@ static void check_bootloader(void) {
145150
unknown_bootloader();
146151
#endif
147152
return;
148-
case BLK_v2_1_1:
153+
case BLK_v2_1_4:
149154
return;
150155
}
151156

0 commit comments

Comments
 (0)