MCUboot Flash and Crypto Security Flaws
2026-11-25
Pre-authentication out-of-bounds flash reads in MCUboot's Cypress/PSoC6 flash-map backend (boot/cypress/cy_flash_pal/cy_flash_map.c, versions 1.6.0 and later) let an attacker who can stage a crafted update image in the secondary slot crash the bootloader instead of having the image cleanly rejected. The backend validates area-relative offsets against the partition's absolute base address (fa->fa_off) rather than its length (fa->fa_size), so oversized header fields in a still-unverified image (ih_hdr_size, ih_img_size, ih_protect_tlv_size) drive reads far past the partition and into unmapped or peripheral regions of the PSoC6 address map, producing a bus fault or hang. Impact is availability-only (CVSS 6.2, AV:L/PR:N/UI:N, C:N/I:N/A:H) - there is no memory corruption, disclosure, or authentication bypass - and the defect is confined to PSoC6 builds; no CISA KEV entry, no public exploit identified at time of analysis, and no vendor-released fix was available at time of analysis (upstream PR #2803 remains open).
MCUboot's swap-resume path in boot_swap_image() trusts the flash-resident swap_size from the slot status trailer without re-derivation or bounds checking, so a forged oversized value drives an unbounded sector walk in find_last_idx()/find_last_sector_idx() that can erase or copy flash out of bounds or loop forever. Exploitation is configuration-gated: the build must use MCUBOOT_SWAP_USING_MOVE (the default for swap builds), MCUBOOT_SWAP_USING_SCRATCH, or MCUBOOT_SWAP_USING_OFFSET together with MCUBOOT_SERIAL_RECOVERY, whose upload path lets an unauthenticated local attacker paint the trailer before signature verification - overwrite-only, direct-XIP and RAM-load builds are unaffected. Outcomes are an unbootable or bricked device and possible bootloader memory corruption; no vendor fix is released yet, an upstream PR (#3013) is open, and no public exploit is identified in the supplied data.
An out-of-bounds read in MCUboot's PSA-crypto ECDSA signature parser lets a crafted, unprotected signature TLV push the RFC 5480 DER decoder past its 128-byte stack buffer before verification ever runs, so a malicious image placed in a slot that undergoes validation can fault the bootloader. Only builds using MCUBOOT_USE_PSA_CRYPTO with MCUBOOT_SIGN_EC256 or MCUBOOT_SIGN_EC384 are exposed (EC256 defaults to TinyCrypt, and MCUBOOT_SIGN_EC384 always builds with PSA), and the in-tree CC310, TinyCrypt and mbedTLS adapters use different length-aware decoders and are unaffected, making the vulnerable path a non-default configuration. Impact is confined to a possible denial of service or fault on memory layouts where the read crosses an unmapped page - on typical flat-memory MCUs it simply reads adjacent RAM; there is no signature bypass, code execution, or information disclosure because the over-read bytes feed a check that fails closed and are never returned to the attacker. Affects MCUboot >= 2.0.0; no vendor-released patch has landed yet. The originating report describes a source-slice ASan proof-of-concept harness, which is not confirmed as publicly available working exploit code, and there is no KEV listing. The assessed CVSS vector is AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, reflecting local attack delivery plus a bounded availability effect.
MCUboot's Espressif port can leave a freshly generated XTS-AES flash-encryption key and the final plaintext flash sector in bootloader stack memory because two local buffers in boot/espressif/hal/src/flash_encrypt.c are never zeroized before their functions return. Exposure is limited to the ESP32/ESP32S2/ESP32C3 port built with CONFIG_SECURE_FLASH_ENC_ENABLED and only during the one-time first-boot provisioning pass; recovering the residue requires an already-available out-of-band memory-disclosure channel such as JTAG, UART ROM download, a crash dump, or a warm-boot RAM scrape, and release-mode fusing plus secure boot removes those channels entirely. Assessed as a low-severity defense-in-depth gap (CVSS 2.0, CWE-226), with no public exploit identified at time of analysis.