What changed, and why it matters
This commit adds a new simulator/testing feature that pretends the device is a 'Nova' model. It only touches test and simulator code, not the real firmware that runs on customer hardware. There is no indication of a security bug or fix.
No security action needed. Treat as normal feature/test infrastructure commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change introduces fake_memory_nova() in test hardware fakes and calls it from the simulator startup. It sets the platform field to MEMORY_PLATFORM_BITBOX02_PLUS and injects a hard-coded allowed firmware hash plus BLE metadata so the simulator can behave like a Nova/BitBox02 Plus device. All changes are confined to test/simulator paths (test/hardware-fakes and test/simulator).
Changed components
test/hardware-fakes/src/fake_memory.ctest/hardware-fakes/include/fake_memory.htest/simulator/simulator.cInspect captured patch +27 / −0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9acc44..c524124 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
- Unlock is now faster after password/passphrase entry (shorter unlock animation)
- Remove option to restore from 18 recovery words
- simulator: enable Test Merchant for payment requests
+- simulator: simulate a Nova device
### 9.23.1
- EVM: add HyperEVM (HYPE) and SONIC (S) to known networks
diff --git a/test/hardware-fakes/include/fake_memory.h b/test/hardware-fakes/include/fake_memory.h
index 5985240..8cf45ad 100644
--- a/test/hardware-fakes/include/fake_memory.h
+++ b/test/hardware-fakes/include/fake_memory.h
@@ -21,6 +21,7 @@
#include <flags.h>
void fake_memory_factoryreset(void);
+bool fake_memory_nova(void);
bool memory_write_to_address_fake(uint32_t base, uint32_t addr, const uint8_t* chunk);
bool memory_write_chunk_fake(uint32_t chunk_num, const uint8_t* chunk);
void memory_read_chunk_fake(uint32_t chunk_num, uint8_t* chunk_out);
diff --git a/test/hardware-fakes/src/fake_memory.c b/test/hardware-fakes/src/fake_memory.c
index 280184a..0ac9ab1 100644
--- a/test/hardware-fakes/src/fake_memory.c
+++ b/test/hardware-fakes/src/fake_memory.c
@@ -15,6 +15,7 @@
#include <fake_memory.h>
#include <flags.h>
#include <memory/memory.h>
+#include <memory/memory_shared.h>
#include <stdio.h>
#include <string.h>
@@ -28,6 +29,25 @@ void fake_memory_factoryreset(void)
memset(_memory_app_data, 0xff, sizeof(_memory_app_data));
memset(_memory_smarteeprom, 0xff, sizeof(_memory_smarteeprom));
}
+#define ALLOWED_HASH \
+ "\x1e\x4a\xa8\x36\x4e\x93\x5c\x07\x85\xe4\xf8\x91\x20\x83\x07\xd8\x32\xf7\x88\x17\x2e\x4b\xf6" \
+ "\x16\x21\xde\x6d\xf9\xec\x3c\x21\x5f"
+
+bool fake_memory_nova(void)
+{
+ chunk_shared_t* shared_ptr = (chunk_shared_t*)&_memory_shared_data[0];
+ shared_ptr->fields.platform = MEMORY_PLATFORM_BITBOX02_PLUS;
+
+ memory_ble_metadata_t ble_metadata = {0};
+ memcpy(ble_metadata.allowed_firmware_hash, ALLOWED_HASH, sizeof(ALLOWED_HASH) - 1);
+ if (!memory_set_ble_metadata(&ble_metadata)) {
+ return false;
+ }
+ if (!memory_ble_enable(false)) {
+ return false;
+ }
+ return true;
+}
static uint8_t* _get_memory(uint32_t base)
{
diff --git a/test/simulator/simulator.c b/test/simulator/simulator.c
index fe77703..92edaee 100644
--- a/test/simulator/simulator.c
+++ b/test/simulator/simulator.c
@@ -19,6 +19,7 @@
#include <fake_memory.h>
#include <fcntl.h>
#include <memory/memory.h>
+#include <memory/memory_shared.h>
#include <queue.h>
#include <random.h>
#include <rust/rust.h>
@@ -128,6 +129,10 @@ int main(int argc, char* argv[])
perror("ERROR, memory setup failed");
return 1;
}
+ if (!fake_memory_nova()) {
+ printf("fake_memory_nova failed");
+ return 1;
+ }
smarteeprom_bb02_config();
bitbox02_smarteeprom_init();
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.