From cd265fe1a79407d9d4459aefbb0bdf7472618e6b Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Fri, 20 Nov 2026 12:13:43 -0700 Subject: [PATCH] fix(bootloader): keep the DFU jump out of secure-boot bootloaders The ROM's DFU bootloader writes any image, so a bootloader that checks signatures would let reboot -i get past them. Those boards just restart the app on reboot -i. --- platforms/nuttx/src/bootloader/stm/stm32_common/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/nuttx/src/bootloader/stm/stm32_common/main.c b/platforms/nuttx/src/bootloader/stm/stm32_common/main.c index b6bc2f4214f..42e0bf25e97 100644 --- a/platforms/nuttx/src/bootloader/stm/stm32_common/main.c +++ b/platforms/nuttx/src/bootloader/stm/stm32_common/main.c @@ -658,7 +658,8 @@ arch_do_jump(const uint32_t *app_base) for (;;) ; } -#if defined(CONFIG_ARCH_CHIP_STM32H7) +/* A bootloader that checks signatures leaves this out, because the ROM's DFU bootloader writes any image. */ +#if defined(CONFIG_ARCH_CHIP_STM32H7) && !defined(BOOTLOADER_USE_SECURITY) /* NuttX's __start calls this before any clock setup, so the chip is still as reset left it, which is how the ROM's * DFU bootloader expects to find it. The app asks for it with reboot -i. */