CVE-2026-16666EPSS p5.6%
CVE-2026-16666CVE-2026-16666
Description
When MCUboot resumes an interrupted image swap it takes the number of bytes to move straight from the flash-resident status trailer. In boot_swap_image() (boot/bootutil/src/loader.c) the fresh-swap branch recomputes copy_size from the image headers and is bounded — swap_run() in boot/bootutil/src/swap_move.c carries an explicit "not enough free space" check (last_idx >= first_trailer_idx) — but that check runs only inside if (boot_status_is_reset(bs)). On the resume branch the code instead does boot_read_swap_size(fap, &bs->swap_size); copy_size = bs->swap_size; and passes the value to swap_run() with no re-derivation and no bound.
swap_run() turns that byte count into a sector index by summing sector sizes until it reaches the count, with no ceiling on the real sector count: find_last_idx() in swap_move.c and swap_offset.c, and find_last_sector_idx() in swap_scratch.c, are all while (1) loops. The resulting index is fed to boot_img_sector_off() / boot_img_sector_size() (boot/bootutil
Scoring
| CVSS | 5.7 () |
| Vector | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H |
| EPSS | 0.20% probability of exploitation · percentile 5.6% · 2026-11-30T12:00:22Z |
| Last modified | 2026-11-30 |