Secure Downlaod mode & Secure Boot efuses on the ESP32-S3

espresso64
Posts: 2
Joined: Sun Aug 24, 2025 7:27 pm

Secure Downlaod mode & Secure Boot efuses on the ESP32-S3

Postby espresso64 » Sun Aug 24, 2025 9:54 pm

Hi,

I was wondering what are the risks if an ESP32-S3 device had ENABLE_SECURITY_DOWNLOAD set to False, but SECURE_BOOT_EN set to True. This would mean that Secure Download mode is disabled, but secure boot is enabled. For the sake of the argument, let's also say that ICACHE and DCACHE aren't readable (the necessary efuses are set).

What are the risks of running this setup? One will be able to read the efuses using efuses.py, write & read the SRAM, and read the encrypted flash. But running code loaded in RAM (using esptool.py load_ram) won't be possible without signing due to secure boot, right?

All I could think of, for now, is that one could read potential sensitive information from the SRAM, if it isn't cleared before entering the Download mode. I think the documentation does say that the SRAM isn't cleared when a non-Chip reset is performed, according to the Technical Reference Manual:
ESP32-S3 provides four reset levels, namely CPU Reset, Core Reset, System Reset, and Chip Reset.
All reset levels mentioned above (except Chip Reset) maintain the data stored in internal memory.
But can someone issue one of these resets and enter the Download mode without a chip reset? Will the BOOT button's state be read on a non-chip reset?

I've seen that the Technical Reference Manual and the ESP32-S3 Datasheet say the following:
The chip allows for configuring the following boot parameters through strapping pins and eFuse bits at power-up or a hardware reset, without microcontroller interaction.
Hardware reset is directly triggered by the circuit.
So I'm not really sure if there's any security issue with leaving ENABLE_SECURITY_DOWNLOAD to false or not.

Thanks in advance!

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: Secure Downlaod mode & Secure Boot efuses on the ESP32-S3

Postby Sprite » Mon Aug 25, 2025 2:27 am

Note that the SRAM technically isn't cleared at all; it's just that pulling down reset will power it down, degrading the contents of it. An attacker could potentially find some way (very short reset pulse, maybe something which triggers the wdt, ...) to keep the SRAM contents mostly intact.

espresso64
Posts: 2
Joined: Sun Aug 24, 2025 7:27 pm

Re: Secure Downlaod mode & Secure Boot efuses on the ESP32-S3

Postby espresso64 » Mon Aug 25, 2025 5:42 am

Makes sense. Thanks! So I guess it’s safe to assume that this setup isn’t very safe at all, so one better doesn’t leave non-Secure download mode enabled in production devices.

I was actually thinking of that, like a voltage glitch of some sort (even if the brownout-type of reset occurs, doesn’t really matter as it will read the strapping pins and enter download mode from that), but I was thinking there may be some clear-at-chip reset sequence. Couldn’t find it in the ESP ROM, though (I thought hmm, maybe it’s a hardware clear of some sort).

Maybe even pressing the reset button could constitute such a reset (does clicking the reset button stop power delivery to the internal SRAM?).
Last edited by espresso64 on Mon Aug 25, 2025 5:44 am, edited 1 time in total.

espresso64
Posts: 2
Joined: Sun Aug 24, 2025 7:27 pm

Re: Secure Downlaod mode & Secure Boot efuses on the ESP32-S3

Postby espresso64 » Mon Aug 25, 2025 5:43 am

Edit: I meant non-secure Download mode - people shouldn’t leave it in production :shock:
Last edited by espresso64 on Mon Aug 25, 2025 5:45 am, edited 1 time in total.

Who is online

Users browsing this forum: Perplexity-User and 4 guests