diff --git a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs index 681cb816f..a370df238 100644 --- a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs +++ b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs @@ -105,6 +105,13 @@ pub fn early_init() { // malleable (no hardware lock to prevent update), which is a potential vulnerability. init_hash(); + // this is a security-critical initialization. Failure to do this correctly breaks + // the hardware access control scheme for key/data slots. + let mut cu = bao1x_hal::coreuser::Coreuser::new(); + // safety: this is safe because it's followed by a `protect()` call. + unsafe { cu.set() }; + cu.protect(); + // TxRx setup #[cfg(feature = "unsafe-dev")] let mut udma_uart = {