1# MCUboot release notes 2 3- Table of Contents 4{:toc} 5 6## Version 2.1.0 7 8- Boot serial: Add response to echo command if support is not 9 enabled, previously the command would have been accepted but no 10 response indicating that the command is not supported would have 11 been sent. 12- Added support for using builtin keys for image validation 13 (available with the PSA Crypto API based crypto backend for ECDSA signatures). 14- Enforce that TLV entries that should be protected are. 15 This can be disabled by defining `ALLOW_ROGUE_TLVS` 16- bootutil: Fixed issue with comparing sector sizes for 17 compatibility, this now also checks against the number of usable 18 sectors (which is the slot size minus the swap status and moved 19 up by one sector). 20- bootutil: Added debug logging to show write location of swap status 21 and details on sectors including if slot sizes are not optimal for 22 a given board. 23- Update ptest to support test selection. Ptest can now be invoked with `list` 24 to show the available tests and `run` to run them. The `-t` argument will 25 select specific tests to run. 26- Allow sim tests to skip slow tests. By setting `MCUBOOT_SKIP_SLOW_TESTS` in 27 the environment, the sim will skip two tests that are very slow. In one 28 instance this reduces the test time from 2 hours to about 5 minutes. These 29 slow tests are useful, in that they test bad powerdown recovery, but are 30 inconvenient when testing other areas. 31- Zephyr: Fixes support for disabling instruction/data caches prior 32 to chain-loading an application, this will be automatically 33 enabled if one or both of these caches are present. This feature 34 can be disabled by setting `CONFIG_BOOT_DISABLE_CACHES` to `n`. 35- Zephyr: Fix issue with single application slot mode, serial 36 recovery and encryption whereby an encrypted image is loaded 37 and being wrongly treated as encrypted after decryption. 38- Zephyr: Add estimated image footer size to cache in sysbuild. 39- Added firmware loader configuration type support for Zephyr, this 40 allows for a single application slot and firmware loader image in 41 the secondary slot which is used to update the primary image 42 (loading it in any way it sees fit e.g. via Bluetooth). 43- Zephyr: Remove deprecated ZEPHYR_TRY_MASS_ERASE Kconfig option. 44- Zephyr: Prevent MBEDTLS Kconfig selection when tinycrypt is used. 45- Zephyr: Add USB CDC serial recovery check that now causes a build 46 failure if console is enabled and device is the same as the USB 47 CDC device. 48- Zephyr: Add USB CDC serial recovery check that now causes a build 49 failure if the main thread priority is below 0 (cooperative 50 thread), this would prevent USB CDC from working as the driver 51 would not have been able to fire callbacks. 52- Use general flash operations to determine the flash reset vector. This 53 improves support a bit for some configurations of external flash. 54- fix a memory leak in the HKDF implementation. 55- Zephyr: Added a MCUboot banner which displays the version of 56 MCUboot being used and the version of zephyr. This can be 57 disabled by setting ``CONFIG_MCUBOOT_BOOT_BANNER=n`` which 58 will revert back to the default zephyr boot banner. 59 60## Version 2.0.0 61 62Note that this release, 2.0.0 is a new major number, and contains a small API 63change in the interface between mcuboot and the platform. All platforms 64contained within the MCUboot tree have been updated, but any external platforms 65will have to be adjusted. The following commit makes the API change, in the 66function `boot_save_shared_data`. 67 68 commit 3016d00cd765e7c09a14af55fb4dcad945e4b982 69 Author: Jamie McCrae <jamie.mccrae@nordicsemi.no> 70 Date: Tue Mar 14 12:35:51 2023 +0000 71 72 bootutil: Add active slot number and max app size to shared data 73 74### About this release 75 76- Add error when flash device fails to open. 77- Panic bootloader when flash device fails to open. 78- Fixed issue with serial recovery not showing image details for 79 decrypted images. 80- Fixes issue with serial recovery in single slot mode wrongly 81 iterating over 2 image slots. 82- CDDL auto-generated function code has been replaced with zcbor function 83 calls, this now allows the parameters to be supplied in any order. 84- Added currently running slot ID and maximum application size to 85 shared data function definition. 86- Make the ECDSA256 TLV curve agnostic and rename it to ECDSA_SIG. 87- imgtool: add P384 support along with SHA384. 88- espressif: refactor after removing IDF submodule 89- espressif: add ESP32-C6, ESP32-C2 and ESP32-H2 new chips support 90- espressif: adjustments after IDF v5.1 compatibility, secure boot build and memory map organization 91- Serial recovery image state and image set state optional commands added 92- imgtool: add 'dumpinfo' command for signed image parsing. 93- imgtool: add 'getpubhash' command to dump the sha256 hash of the public key 94- imgtool's getpub can print the output to a file 95- imgtool can dump the raw versions of the public keys 96- Drop ECDSA P224 support 97- Fixed an issue with boot_serial repeats not being processed when 98 output was sent, this would lead to a divergence of commands 99 whereby later commands being sent would have the previous command 100 output sent instead. 101- Fixed an issue with the boot_serial zcbor setup encoder function 102 wrongly including the buffer address in the size which caused 103 serial recovery to fail on some platforms. 104- zcbor library files have been updated to version 0.7.0 105- Reworked boot serial extensions so that they can be used by modules 106 or from user repositories by switching to iterable sections. 107- Removed Zephyr custom img list boot serial extension support. 108- (Zephyr) Adds support for sharing boot information with 109 application via retention subsystem 110- Zephyr no longer builds in optimize for debug mode, this saves a 111 significant amount of flash space. 112- Reworked image encryption support for Zephyr, static dummy key files 113 are no longer in the code, a pem file must be supplied to extract 114 the private and public keys. The Kconfig menu has changed to only 115 show a single option for enabling encryption and selecting the key 116 file. 117- Serial recovery can now read and handle encrypted seondary slot 118 partitions. 119- Serial recovery with MBEDTLS no longer has undefined operations which 120 led to usage faults when the secondary slot image was encrypted. 121- espressif: allow the use of a different toolchain for building 122 123## Version 1.10.0 124 125The 1.10.0 release of MCUboot contains... 126 127### About this release 128 129- Various fixes to boot serial. 130- Various fixes to the mbed target. 131- Various fixes to the Espressif native target. 132- Various fixes to the Zephyr target. 133- Workflow improvements with Zephyr CI. 134- Add multi image support to the espressif esp32 target. 135- Improvements and corrections to the simulator. 136- Improve imgtool, including adding 3rd party signing support. 137- Various fixes to the mynewt target. 138- Various fixes to the nuttx target. 139- Dates to dependencies for doc generation. 140- Add downgrade prevention for modes using swap. 141- Various general fixes to the boot code. 142- Prefer swap move on zephyr if the scratch partition is not enabled. 143- Upgrade fault-injection hardening, improving cases injections are detected. 144- Add a new flash api `flash_area_get_sector`, along with support for each 145 target, that replaces `flash_area_sector_from_off`. This is a step in cleaning 146 up the flash API used by MCUboot. 147 148### Security fixes 149 150There are no security vulnerabilities reported on the MCUboot code for this 151release. There have been several updates to the dependencies in the Ruby code 152used to generate the documentation. This should only affect users that generate 153their own documentation. 154 155## Version 1.9.0 156 157The 1.9.0 release of MCUboot contains various bug fixes, improves 158support on some recent targets, and adds support for devices with a 159write alignment larger than 8. 160 161This change introduces a potentially incompatible change to the format 162of the image trailer. If `BOOT_MAX_ALIGN` is kept at 8, the trailer 163format does not change. However, to support larger write alignments, 164this value can be increased, which will result in a different magic 165number value. These targets were previously unsupported in MCUboot, 166so this change should not affect any existing targets. The change has 167been tested with a `BOOT_MAX_ALIGN` up to 32 bytes. 168 169### About this release 170 171- Add native flash encryption to Espressif targets 172- Numerous documentation improvements 173- Increase coverage of large images in the simulator 174- Add stm32 watchdog support 175- Add support for the `mimxrt685_evk` board 176- Add support for "partial multi-image booting" 177- Add support for clear image generation with encryption capability to 178 imgtool 179- Fix Zephyr when `CONFIG_BOOT_ENCRYPTION_KEY_FILE` is not defined 180- Remove zephyr example test running in shell. The Go version is 181 primary and much more featureful. 182- imgtool: make `--max-align` default reasonable in most cases. 183- Implement the mcumgr echo command in serial boot mode 184 185### Security fixes 186 187## Version 1.8.0 188 189The 1.8.0 release of MCUboot contains numerous fixes, and adds support 190for the NuttX RTOS, and the Espressif ESP32 SDK. 191 192### About this release 193 194- Add support for the NuttX RTOS. 195- Add support for the Espressif ESP32 SDK. 196- `boot_serial` changed to use cddl-gen, which removes the dependency 197 on tinycbor. 198- Add various hooks to be able to change how image data is accessed. 199- Cypress supports Mbed TLS for encryption. 200- Support using Mbed TLS for ECDSA. This can be useful if Mbed TLS is 201 brought in for another reason. 202- Add simulator support for testing direct-XIP and ramload. 203- Support Mbed TLS 3.0. Updates the submodule for Mbed TLS to 3.0. 204- Enable direct-xip mode in Mbed-OS port. 205- extract `bootutil_public` library, a common interface for MCUboot 206 and the application. 207- Allow to boot primary image if secondary one is unreachable. 208- Add AES256 image encryption support. 209- Add Multiimage boot for direct-xip and ram-load mode. 210- Cargo files moved to top level, now `cargo test` can be run from the 211 top level directory. 212- Fault injection tests use updated TF-M. 213- Thingy:53 now supports multi-image DFU. 214- ram load and image encryption can be used together, allowing the 215 entire contents of flash to always remain encrypted. 216 217### Security fixes 218 219- [GHSA-gcxh-546h-phg4](https://github.com/mcu-tools/mcuboot/security/advisories/GHSA-gcxh-546h-phg4) 220 has been published. There is not a fix at this time, but a caution 221 to be sure to follow the instructions carefully, and make sure that 222 the development keys in the repo are never used in a production 223 system. 224 225## Version 1.7.0 226 227The 1.7.0 release of MCUboot adds support for the Mbed-OS platform, 228Equal slots (direct-xip) upgrade mode, RAM loading upgrade mode, 229hardening against hardware level fault injection and timing attacks 230and single image mode. 231There are bug fixes, and associated imgtool updates as well. 232 233### About this release 234 235- Initial support for the Mbed-OS platform. 236- Added possibility to enter deep sleep mode after MCUboot app execution 237 for cypress platform. 238- Added hardening against hardware level fault injection and timing attacks. 239- Introduced Abstract crypto primitives to simplify porting. 240- Added RAM-load upgrade mode. 241- Renamed single-image mode to single-slot mode. 242- Allow larger primary slot in swap-move 243- Fixed boostrapping in swap-move mode. 244- Fixed issue causing that interrupted swap-move operation might brick device 245 if the primary image was padded. 246- Abstracting MCUboot crypto functions for cleaner porting 247- Droped flash_area_read_is_empty() porting API. 248- boot/zephyr: Added watchdog feed on nRF devices. 249 See `CONFIG_BOOT_WATCHDOG_FEED` option. 250- boot/zephyr: Added patch for turning off cache for Cortex M7 before 251 chain-loading. 252- boot/zephyr: added option to relocate interrupts to application 253- boot/zephyr: clean ARM core configuration only when selected by user 254- boot/boot_serial: allow nonaligned last image data chunk 255- imgtool: added custom TLV support. 256- imgtool: added possibility to set confirm flag for hex files as well. 257- imgtool: Print image digest during verify. 258 259### Zephyr-RTOS compatibility 260 261This release of MCUboot works with the Zephyr "main" at the time of the 262release. It was tested as of has 7a3b253ce. This version of MCUboot also 263works with the Zephyr v2.4.0, however it is recommended to enable 264`CONFIG_MCUBOOT_CLEANUP_ARM_CORE` while using that version. 265 266## Version 1.6.0 267 268The 1.6.0 release of MCUboot adds support for the PSOC6 platform, 269X25519 encrypted images, rollback protection, hardware keys, and a 270shared boot record to communicate boot attestation information to 271later boot stages. There are bug fixes, and associated imgtool 272updates as well. 273 274### About this release 275 276- Initial support for the Cypress PSOC6 plaformt. This platform 277 builds using the Cypress SDK, which has been added as submodules. 278- CBOR decoding in serial recovery replaced by code generated from a 279 CDDL description. 280- Add support for X25519 encrypted images. 281- Add rollback protection. There is support for a HW rollback counter 282 (which must be provided as part of the platform), as well as a SW 283 solution that protects against some types of rollback. 284- Add an optional boot record in shared memory to communicate boot 285 attributes to later-run code. 286- Add support for hardware keys. 287- Various fixes to work with the latest Zephyr version. 288 289### Security issues addressed 290 291- CVE-2020-7595 "xmlStringLenDecodeEntities in parser.c in libxml2 292 2.9.10 has an infinite loop in a certain end-of-file situation." Fix 293 by updating a dependency in documentation generation. 294 295### Zephyr-RTOS compatibility 296 297This release of MCUboot works the Zephyr "main" at the time of the 298release. It was tested as of has 1a89ca1238. When Zephyr v2.3.0 is 299released, there will be a possible 1.6.1 or similar release of Zephyr 300if needed to address any issues. There also may be branch releases of 301MCUboot specifically for the current version of Zephyr, e.g. 302v1.6.0-zephyr-2.2.1. 303 304## Version 1.5.0 305 306The 1.5.0 release of MCUboot adds support for encrypted images using 307ECIES with secp256r1 as an Elliptic Curve alternative to RSA-OAEP. A 308new swap method was added which allows for upgrades without using a 309scratch partition. There are also lots of bug fixes, extra simulator 310testing coverage and some imgtool updates. 311 312### About this release 313 314- TLVs were updated to use 16-bit lengths (from previous 8). This 315 should work with no changes for little-endian targets, but will 316 break compatibility with big-endian targets. 317- A benchmark framework was added to Zephyr 318- ed25519 signature validation can now build without using Mbed TLS 319 by relying on a bundled tinycrypt based sha-512 implementation. 320- imgtool was updated to correctly detect trailer overruns by image. 321- Encrypted image TLVs can be saved in swap metadata during a swap 322 upgrade instead of the plain AES key. 323- imgtool can dump private keys in C format (getpriv command), which 324 can be added as decryption keys. Optionally can remove superfluous 325 fields from the ASN1 by passing it `--minimal`. 326- Lots of other smaller bugs fixes. 327- Added downgrade prevention feature (available when the overwrite-based 328 image update strategy is used) 329 330### Known issues 331 332- TLV size change breaks compatibility with big-endian targets. 333 334## Version 1.4.0 335 336The 1.4.0 release of MCUboot primarily adds support for multi-image 337booting. With this release, MCUboot can manage two images that can be 338updated independently. With this, it also supports additions to the 339TLV that allow these dependencies to be specified. 340 341Multi-image support adds backward-incompatible changes to the format 342of the images: specifically adding support for protected TLV entries. 343If multiple images and dependencies are not used, the images will be 344compatible with previous releases of MCUboot. 345 346### About this release 347 348- Fixed CVE-2019-5477, and CVE-2019-16892. These fix issue with 349 dependencies used in the generation of the documentation on github. 350- Numerous code cleanups and refactorings 351- Documentation updates for multi-image features 352- Update imgtool.py to support the new features 353- Updated the Mbed TLS submodule to current stable version 2.16.3 354- Moved the Mbed TLS submodule from within sim/mcuboot-sys to ext. 355 This will make it easier for other board supports to use this code. 356- Added some additional overflow and bound checks to data in the image 357 header, and TLV data. 358- Add a `-x` (or `--hex_addr`) flag to imgtool to set the base address 359 written to a hex-format image. This allows the image to be flashed 360 at an offset, without having to use additional tools to modify the 361 image. 362 363## Version 1.3.1 364 365The 1.3.1 release of MCUboot consists mostly of small bug fixes and updates. 366There are no breaking changes in functionality. This release should work with 367Mynewt 1.6.0 and up, and any Zephyr `main` after sha 368f51e3c296040f73bca0e8fe1051d5ee63ce18e0d. 369 370### About this release 371 372- Fixed a revert interruption bug 373- Added ed25519 signing support 374- Added RSA-3072 signing support 375- Allow ec256 to run on CC310 interface 376- Some preparation work was done to allow for multi image support, which 377 should land in 1.4.0. This includes a simulator update for testing 378 multi-images, and a new name for slot0/slot1 which are now called 379 "primary slot" and "secondary slot". 380- Other minor bugfixes and improvements 381 382## Version 1.3.0 383 384The 1.3.0 release of MCUboot brings in many fixes and updates. There 385are no breaking changes in functionality. Many of the changes are 386refactorings that will make the code easier to maintain going forward. 387In addition, support has been added for encrypted images. See [the 388docs](encrypted_images.md) for more information. 389 390### About this release 391 392- Modernize the Zephyr build scripts. 393- Add a `ptest` utility to help run the simulator in different 394 configurations. 395- Migrate the simulator to Rust 2018 edition. The sim now requires at 396 least Rust 1.32 to build. 397- Simulator cleanups. The simulator code is now built the same way 398 for every configuration, and queries the MCUboot code for how it was 399 compiled. 400- Abstract logging in MCUboot. This was needed to support the new 401 logging system used in Zephyr. 402- Add multiple flash support. Allows slot1/scratch to be stored in an 403 external flash device. 404- Add support for [encrypted images](encrypted_images.md). 405- Add support for flash devices that read as '0' when erased. 406- Add support to Zephyr for the `nrf52840_pca10059`. This board 407 supports serial recovery over USB with CDC ACM. 408- imgtool is now also available as a python package on pypi.org. 409- Add an option to erase flash pages progressively during recovery to 410 avoid possible timeouts (required especially by serial recovery 411 using USB with CDC ACM). 412- imgtool: big-endian support 413- imgtool: saves in intel-hex format when output filename has `.hex` 414 extension; otherwise saves in binary format. 415 416## Version 1.2.0 417 418The 1.2.0 release of MCUboot brings a lot of fixes/updates, where much of the 419changes were on the boot serial functionality and imgtool utility. There are 420no breaking changes in MCUboot functionality, but some of the CLI parameters 421in imgtool were changed (either removed or added or updated). 422 423### About this release 424 425- imgtool accepts .hex formatted input 426- Logging system is now configurable 427- Most Zephyr configuration has been switched to Kconfig 428- Build system accepts .pem files in build system to autogenerate required 429 key arrays used internally 430- Zephyr build switched to using built-in flash_map and TinyCBOR modules 431- Serial boot has substantially decreased in space usage after refactorings 432- Serial boot build doesn't require newlib-c anymore on Zephyr 433- imgtool updates: 434 + "create" subcommand can be used as an alias for "sign" 435 + To allow imgtool to always perform the check that firmware does not 436 overflow the status area, `--slot-size` was added and `--pad` was updated 437 to act as a flag parameter. 438 + `--overwrite-only` can be passed if not using swap upgrades 439 + `--max-sectors` can be used to adjust the maximum amount of sectors that 440 a swap can handle; this value must also be configured for the bootloader 441 + `--pad-header` substitutes `--included-header` with reverted semantics, 442 so it's not required for firmware built by Zephyr build system 443 444### Known issues 445 446None 447 448## Version 1.1.0 449 450The 1.1.0 release of MCUboot brings a lot of fixes/updates to its 451inner workings, specially to its testing infrastructure which now 452enables a more thorough quality assurance of many of the available 453options. As expected of the 1.x.x release cycle, no breaking changes 454were made. From the tooling perpective the main addition is 455newt/imgtool support for password protected keys. 456 457### About this release 458 459- serial recovery functionality support under Zephyr 460- simulator: lots of refactors were applied, which result in the 461 simulator now leveraging the Rust testing infrastructure; testing 462 of ecdsa (secp256r1) was added 463- imgtool: removed PKCS1.5 support, added support for password 464 protected keys 465- tinycrypt 0.2.8 and the Mbed TLS ASN1 parser are now bundled with 466 MCUboot (eg secp256r1 is now free of external dependencies!) 467- Overwrite-only mode was updated to erase/copy only sectors that 468 actually store firmware 469- A lot of small code and documentation fixes and updates. 470 471### Known issues 472 473None 474 475## Version 1.0.0 476 477The 1.0.0 release of MCUboot introduces a format change. It is 478important to either use the `imgtool.py` also from this release, or 479pass the `-2` to recent versions of the `newt` tool in order to 480generate image headers with the new format. There should be no 481incompatible format changes throughout the 1.x.y release series. 482 483### About this release 484 485- Header format change. This change was made to move all of the 486 information about signatures out of the header and into the TLV 487 block appended to the image. This allows 488 - The signature to be replaced without changing the image. 489 - Multiple signatures to be applied. This can be used, for example, 490 to sign an image with two algorithms, to support different 491 bootloader configurations based on these image. 492 - The public key is referred to by its SHA1 hash (or a prefix of the 493 hash), instead of an index that has to be maintained with the 494 bootloader. 495 - Allow new types of signatures in the future. 496- Support for PKCS#1 v1.5 signatures has been dropped. All RSA 497 signatures should be made with PSS. The tools have been changed to 498 reflect this. 499- The source for Tinycrypt has been placed in the MCUboot tree. A 500 recent version of Tinycrypt introduced breaking API changes. To 501 allow MCUboot to work across various platforms, we stop using the 502 Tinycrypt bundled with the OS platform, and use our own version. A 503 future release of MCUboot will update the Tinycrypt version. 504- Support for some new targets: 505 - Nordic nRF51 and nRF52832 dev kits 506 - Hexiwear K64 507- Clearer sample applications have been added under `samples`. 508- Test plans for [zephyr](testplan-zephyr.md), and 509 [mynewt](testplan-mynewt.md). 510- The simulator is now able to test RSA signatures. 511- There is an unimplemented `load_addr` header for future support for 512 RAM loading in the bootloader. 513- Numerous documentation. 514 515### Known issues 516 517None 518 519## Version 0.9.0 520 521This is the first release of MCUboot, a secure bootloader for 32-bit MCUs. 522It is designed to be operating system-agnostic and works over any transport - 523wired or wireless. It is also hardware independent, and relies on hardware 524porting layers from the operating system it works with. For the first release, 525we have support for three open source operating systems: Apache Mynewt, Zephyr 526and RIOT. 527 528### About this release 529 530- This release supports building with and running Apache Mynewt and Zephyr 531 targets. 532- RIOT is supported as a running target. 533- Image integrity is provided with SHA256. 534- Image originator authenticity is provided supporting the following 535 signature algorithms: 536 - RSA 2048 and RSA PKCS#1 v1.5 or v2.1 537 - Elliptic curve DSA with secp224r1 and secp256r1 538- Two firmware upgrade algorithms are provided: 539 - An overwrite only which upgrades slot 0 with the image in slot 1. 540 - A swapping upgrade which enables image test, allowing for rollback to a 541 previous known good image. 542- Supports both Mbed TLS and tinycrypt as backend crypto libraries. One of them 543 must be defined and the chosen signing algorithm will require a particular 544 library according to this list: 545 - RSA 2048 needs Mbed TLS 546 - ECDSA secp224r1 needs Mbed TLS 547 - ECDSA secp256r1 needs tinycrypt as well as the ASN.1 code from Mbed TLS 548 (so still needs that present). 549 550### Known issues 551 552- The image header and TLV formats are planned to change with release 1.0: 553 https://runtimeco.atlassian.net/browse/MCUB-66 554