This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Secure bootloader dfu ACL MBR security

I'm looking at the secure boot in the sdk for nrf52840 and have noticed that nrf_bootloader_flash_protect uses the ACL to protect the MBR and the bootloader from being overwritten. Next, during a DFU, the bootloader is overwritten, I think by the MBR.

I have two questions:

  1. How does the MBR overwrite the bootloader even while it is protected by the ACL?
  2. More generally, what does the ACL protect from, is it the SoC Library only?
  3. What prevents the MBR prevent itself being used to overwrite the bootloader, bypassing the ACL?

Thanks for any help

Parents
  • Hi Wang, 

    1. There is a reset after you call the MBR command SD_MBR_COMMAND_COPY_BL to replace the bootloader. After a reset the MBR should be able to access the bootloader's flash area. 

    2&3. The ACL protection for MBR and bootloader is just to avoid the application to accidentally erase/modify the MBR or bootloader. It's not a measure to protect the bootloader from being attacked by the application code. It's important to make sure the application image is authorized and is safe (using signature as in our secure bootloader). 

Reply
  • Hi Wang, 

    1. There is a reset after you call the MBR command SD_MBR_COMMAND_COPY_BL to replace the bootloader. After a reset the MBR should be able to access the bootloader's flash area. 

    2&3. The ACL protection for MBR and bootloader is just to avoid the application to accidentally erase/modify the MBR or bootloader. It's not a measure to protect the bootloader from being attacked by the application code. It's important to make sure the application image is authorized and is safe (using signature as in our secure bootloader). 

Children
Related