Hi!
I'm developing on nRF51 with SDK 11 and trying to extend our application with buttonless BLE DFU support. Due to limited flash memory, we could only use single bank ble bootloader. Right now the bootloader works fine but we want to make it more secure and safe, so that it can't be easily attacked and brick.
At first attempt, I tried to use the init packet validation to stop random DFU update requests. I found that for all legacy BLE DFU (single or dual), the app space is erased before the init packet is received and checked. So essentially, anyone with a valid/non-valid DFU package can erase the original application on the device.
So I've also tried to modify the state machine in dfu_single_bank.c to erase the flash after init packet prevalidation is successful. But the DFU transfer would stuck at 0% percent (with the correct init packet).
I'm wondering:
- If anyone have successfully changed the DFU state machine this way.
- Or are there other solutions to make legacy DFU more secure without having to switch to secure DFU (need more flash and requrie higher SDK than we have now)?