Skip to content
DayZeroHub
Medium Not yet writtenCVSS 6.2CVE-2026-16667

CVE-2026-16667: Cypress/PSoC6 flash backend fails to bounds-check flash accesses, allowing pre-auth out-of-bounds reads

mcu-tools mcuboot

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-16667: medium-severity vulnerability (CVSS 6.2) in mcu-tools mcuboot.

What happened

Original description from the source: The Cypress/PSoC6 flash-map backend in boot/cypress/cy_flash_pal/cy_flash_map.c guards every flash access with assert() against the wrong struct field. flash_area_read(), flash_area_write(), and flash_area_erase() check assert(off < fa->fa_off) and assert(off + len < fa->fa_off), comparing the area-relative off against the partition's absolute base address fa->fa_off instead of its length fa->fa_size. Because fa_off is a large absolute address, realistic out-of-partition offsets pass the check even in a debug build, and under NDEBUG the asserts are removed entirely. The access then proceeds as memcpy() (or a flash row op) at fa->fa_off + off with no enforcement. The MCUboot core does not bound image-region offsets itself; it relies on flash_area_read() returning an error. During pre-authentication image validation, bootutil_img_hash() in boot/bootutil/src/bootutil_img_hash.c loops over ih_hdr_size + ih_img_size + ih_protect_tlv_size — all attacker-controlled header fields of the still-unverified update image — calling flash_area_read(), and the TLV iterator in boot/bootutil/src/tlv.c reads attacker-derived offsets the same way. An attacker who can stage a crafted image in the secondary/update slot (via OTA, DFU, or serial recovery, depending on the product) declares an oversized ih_img_size, causing reads far past the partition. A correct backend would reject these and fail validation cleanly; the Cypress backend does not. The out-of-bounds access is in the source address of the copy — the destination buffer is correctly sized — so there is no memory corruption, no information disclosure to the attacker (the data is only folded into a hash that still fails the signature…

Why it matters

Medium severity, CVSS 6.2.

Affected products and versions

mcu-tools mcuboot 1.6.0

ProductVersionsFixed in
mcu-tools mcuboot1.6.0—

Action recommended by the source

See the official references for the fix or mitigation.

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-125

Relevant change history

  1. Published

    Preliminary advisory published.