Commit Graph

81 Commits

Author SHA1 Message Date
Fabio Utzig 3647ded973 docs: update nokogiri to fix CVE-2020-7595
https://nvd.nist.gov/vuln/detail/CVE-2020-7595

Signed-off-by: Fabio Utzig <utzig@apache.org>
2020-02-25 09:26:02 -03:00
Fabio Utzig ef7fbd7012 Preparing for v1.5.0-rc1
Signed-off-by: Fabio Utzig <utzig@apache.org>
2020-02-07 15:30:45 -03:00
Fabio Utzig 970840ccf5 docs: fix mailing list URL
Signed-off-by: Fabio Utzig <utzig@apache.org>
2020-02-06 06:00:28 -03:00
Håkon Øye Amundsen 2d1bac164f add option for rollback protection
Depends on 'MCUBOOT_OVERWRITE_ONLY' option since swap info is not protected
by signature

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-01-23 12:47:05 -07:00
Rajiv Ranganath b976a4c0dc docs/PORTING.md: Update APIs needed for porting MCUboot
Signed-off-by: Rajiv Ranganath <rajiv.ranganath@atihita.com>
2020-01-13 10:09:54 -03:00
David Brown 3639aca071 docs: Change name of padding arguments
To be squashed

Signed-off-by: David Brown <david.brown@linaro.org>
2019-12-18 11:53:25 -07:00
David Brown bf3a3a9c71 docs: Typo fixes and suggestions from mbolivar
To be squashed after review.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-12-18 11:53:25 -07:00
David Brown 8f057ca5ae docs: Write up some docs about ecdsa padding
Start with some documentation on ECDSA signatures, and the problems with
the current padding approach.  Present a plan to support correctly
formatted ECDSA signatures, and how to handle the transition both in the
C code, as well as the tooling that signs images.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-12-18 11:53:25 -07:00
Fabio Utzig d37d877603 Add html anchors to design and imgtool documents
When pages are built from the markdown sources, the html anchors for
titles are automatically added, but no links are inserted in the pages.
This makes it harder to send URLs to sections; one has to browse the
page source to get the correct link. This fixes the issue by adding
links directly to the generated pages.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-12-03 16:35:58 -03:00
Fabio Utzig 478ad247b3 docs: add URL anchor links to encrypted images md
URL anchors are already generated automatically by the GH markdown
processor, but they are not visible. This adds the proper links to the
page.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-11-29 12:55:33 -03:00
Fabio Utzig b3f058c0ef docs: describe ECIES-P256 encrypted image support
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-11-06 06:55:25 -03:00
Ruth Fuchss 4023d62849 docs: add link to encrypted_images.md and cleanup
Add a link to the topic about encrypted images to the start page.
Clean up the existing links to make the table of contents more
consistent.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2019-11-01 13:10:41 -03:00
Ruth Fuchss 721cdbc49e docs: add missing heading
Add an H1 heading to encrypted_images.md.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2019-11-01 13:10:41 -03:00
Sam Bristow d0ca0ffc27 Fix up typos
Ran automated checker for common typos [1]. Most of these changes have
no functional change *except* for `./ci/sim_run.sh` where, previously
the `bootstrap` feature wasn't being selected properly.

I didn't touch anything in the `./ext/` folder as anything in there
should probably be fixed in the upstream repo.

[1] https://github.com/codespell-project/codespell

Signed-off-by: Sam Bristow <sam@bristow.nz>
2019-10-30 06:24:10 -03:00
David Brown d7581779d8 Prepare for release v1.4.0-rc2
Update version stamps as well as the release notes.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-10-15 14:50:09 -06:00
Fabio Utzig c7fe3b061e Document imgtool release process
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-10-15 12:35:01 -03:00
Fabio Utzig 1b7777b476 Fix CVE-2019-16892
https://nvd.nist.gov/vuln/detail/CVE-2019-16892

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-10-15 12:28:34 -03:00
David Brown 4d0c5fa488 Release notes for 1.4.0-rc1
Signed-off-by: David Brown <david.brown@linaro.org>
2019-10-08 10:45:14 -07:00
David Brown 37b96e7aab docs: Fix formatting of security document
Markdown considers a block of indented text after a list item to be part
of that list item.  Insert a small piece of text at the top level to
prevent that.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-10-08 10:45:14 -07:00
David Brown 0d98a9c2b0 docs: Create initial security policy
Signed-off-by: David Brown <david.brown@linaro.org>
2019-10-08 08:56:53 -07:00
Fabio Utzig fd140ecef2 New protected TLV format proposal
Updates the protected TLV specification to have their own TLV info struct,
to ease hashing without having to skip parts of the image, while adding the
ability to append new non-protected TLVs.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-10-01 18:30:05 -03:00
Fabio Utzig c28005b04f Use better naming for swap copy/erase functions
Since a copy/erase during a swap can result in some number of sectors
erased and copied, which is not necessarily equal to 1, update design
document and bootloader function naming to reflect this fact, by using
the postfix "_region" instead of "_sector" in those cases.

This fixes #541

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-09-10 13:41:58 -03:00
Fabio Utzig 75b344198e Fix a few formatting issues in design doc
Fix text structures that were not rendering correctly in the generated
html.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-09-09 10:00:09 -03:00
Fabio Utzig 60319acf0f Update swap operation description in design doc
Update to better match the current implementation.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-09-09 10:00:09 -03:00
Fabio Utzig 7eaaf67bbf Fix for CVE-2019-5477
https://nvd.nist.gov/vuln/detail/CVE-2019-5477

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-08-26 14:01:37 -03:00
Håkon Øye Amundsen cbf3047d48 docs: fix typos in design.md
Minor typo fixes.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-07-24 07:02:20 -03:00
David Vincze e32483f10f Boot: Add dependency check to multi-image boot
This patch adds the capability to check image dependencies in case
of multi-image boot. The dependencies are described with a new type
of TLV in the manifest.

Change-Id: If45f81a00d4324c881634f50156f9939e1bf8707
Signed-off-by: David Vincze <david.vincze@arm.com>
2019-07-23 09:11:34 -05:00
David Vincze ba3bd606be Boot: Enable multi-image boot
This patch adds the capability to handle multiple firmware images,
to update them independently. Also update the design documentation.
It separates the completion of aborted image swap operations and the
update of images even more as these should be happening at different
stages of the boot process according to the design proposal of
the multiple image support:
https://github.com/JuulLabs-OSS/mcuboot/pull/317.

Change-Id: I7eb5f632298bb08c805bfaee0359703b2ae19e9d
Signed-off-by: David Vincze <david.vincze@arm.com>
2019-07-23 09:11:34 -05:00
David Vincze b75c12a431 Boot: Extend flash layout for multiple images
This patch introduces the BOOT_IMAGE_NUMBER macro and current_image
variable to support multiple updatable images and the associated
extended flash layout.

The FLASH_AREA_IMAGE_* object-like macros are replaced with
function-like ones and therefore some functions have been updated,
because the labels of a switch statement and the initialization
values of objects with static storage duration have to be constant
expressions.

Change-Id: Ib7b26ec3c94233e52db4f97825ddb6a3e55bb1d3
Signed-off-by: David Vincze <david.vincze@arm.com>
2019-07-23 09:11:34 -05:00
David Vincze e24534799b Boot: Save image sequence number to image trailer
Overload the swap_type field in image trailer to store as an addition
the image sequence number. It indicates which image's swap was
interrupted. It is required by multi image boot to determine which
image the trailer belongs to if boot status is found on scratch area
when the swap operation is resumed.

Change-Id: I6820fd8277931aff4f0db408376eae8b42a030ed
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2019-07-23 09:11:34 -05:00
Szymon Janc 7fea84665f Release 1.3.1
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2019-07-08 08:50:16 -03:00
Fabio Utzig 195411f212 Add ed25519 TLV to design doc
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-06-28 08:46:12 -03:00
Fabio Utzig 8101d1fa44 Add ed25519 signing support to imgtool
This adds ed25519 signature support using the "prehash" method. Instead
of using the direct contents of the image and header payloads, a sha256
is generated and signed (SHA256-Ed25519). This allows for compatibility
with already existing tools that use the sha256 hash, like mcumgr, etc.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-06-13 19:21:05 -03:00
Christopher Collins a1c1204f65 Fix double swap on interrupted revert
This fixes #480.

When mcuboot rewrites image trailers during a swap, some information is
lost.  If a reset occurs before the swap completes, mcuboot may not be
able to determine what which swap type to resume upon startup.
Specifically, if a "revert" swap gets interupted, mcuboot will perform
an extraneous swap on the subsequent boot.  See
https://github.com/JuulLabs-OSS/mcuboot/issues/480 for details.

This commit adds an additional field to the image trailer: `swap-type`.
The new trailer structure is illustrated below:

```
     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ~                                                               ~
    ~    Swap status (BOOT_MAX_IMG_SECTORS * min-write-size * 3)    ~
    ~                                                               ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ~                 Encryption key 0 (16 octets) [*]              ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ~                 Encryption key 1 (16 octets) [*]              ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           Swap size           |    0xff padding (4 octets)    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Swap type   |           0xff padding (7 octets)             ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Copy done   |           0xff padding (7 octets)             ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Image OK    |           0xff padding (7 octets)             ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ~                       MAGIC (16 octets)                       ~
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```

The `swap-type` field contains one of the `BOOT_SWAP_TYPE_[...]` constants.
Every time a trailer is written, this field is written along with it.
When resuming an interrupted swap, mcuboot uses this field alone to
determine the type of swap being resumed. For new swap operations
(non-resume case), this field is not read at all; instead, mcuboot
consults the `boot_swap_tables` array to determine the swap operation to
perform (as it did prior to this commit).

Some additional changes were necessary to make all the simulated unit
tests pass:

* Before initiating a new swap operation, always write the image trailer
to the scratch area.  This step allows mcuboot to persist the
`swap-type` field somewhere before erasing the trailer in the primary
slot.  If a reset occurs immediately after the erase, mcuboot recovers
by using the trailer in the scratch area.

* Related to the above: if the scratch area is being used to hold status
bytes (because there are no spare sectors in the primary slot), erase
the scratch area immediately after the trailer gets written to the
primary slot.  This eliminates ambiguity regarding the location of the
current trailer in case a reset occurs shortly afterwards.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2019-05-31 10:15:08 -07:00
Fabio Utzig 19fd79a496 Add RSA-3072 support to imgtool
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-05-16 14:01:19 -03:00
Fabio Utzig 3501c01641 Add bootutil support for RSA-3072
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-05-16 14:01:19 -03:00
Fabio Utzig e1727d9d2b Add Mynewt specific release information
Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-05-06 15:31:48 -03:00
David Vincze 2d736ad4c5 Replace flash partitioning terminology
This change replaces the slot 0/1 terminology with primary/secondary
slot and replaces FLASH_AREA_IMAGE_0/1 with
FLASH_AREA_IMAGE_PRIMARY/SECONDARY. This naming convention may be more
understandable, fits better to MCUs with multiple images and it is an
architecture agnostic alternative as well.

Change-Id: I655a585f6ae023852c671ee6635399efe25209c9
Signed-off-by: David Vincze <david.vincze@arm.com>
Signed-off-by: David Brown <david.brown@linaro.org>
2019-03-13 15:40:21 -06:00
Maureen Helm 0e0c488ab4 docs: samples: Update pyocd calls to unified tool subcommands
pyocd 0.14.0 merged its command-line tools into a unified pyocd tool
with subcommands. The separate command-line tools still remain, but are
deprecated. Update all pyocd calls in samples and documentation to use
the new unified pyocd tool with subcommands.

Note that pyocd 0.15.0 has an issue with the command 'pyocd erase',
which was fixed in pyocd 0.16.0.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-19 14:09:36 -03:00
David Brown b1d15a7195 docs: Release notes for 1.3.0-rc1
Signed-off-by: David Brown <david.brown@linaro.org>
2019-01-24 10:03:37 -07:00
Ruth Fuchss db1a5f3b6a doc: fix typo in file name
Broken link in design.md since the file name is misspelled.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2019-01-14 15:00:35 -02:00
Fabio Utzig 3635a0c330 Update Jekyll due to CVE
https://nvd.nist.gov/vuln/detail/CVE-2018-17567

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-01-02 16:43:39 -02:00
Fabio Utzig a3c2f05754 Fix main github repo links in docs
This updates all references from github.com/runtimeco to
github.com/JuulLabs-OSS in docs and yml files.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2018-11-16 15:10:52 -03:00
Sigvart M. Hovland 68b3053694 Add deprecated warning to Jira and Confluence links
This will fix #336 by adding deprecation warning to Jira and
Confluence links as these are not used by the project anymore.

Signed-off-by: Sigvart M. Hovland <sigvart.m@gmail.com>
2018-10-22 15:30:47 -03:00
Fabio Utzig cdfa11a7a9 Add encrypt images design/usage documentation
Signed-off-by: Fabio Utzig <utzig@apache.org>
2018-10-12 13:36:13 -03:00
Fabio Utzig eb1e8d465f Update jekyll dependencies to fix CVE-2018-1000201
https://nvd.nist.gov/vuln/detail/CVE-2018-1000201

Signed-off-by: Fabio Utzig <utzig@apache.org>
2018-09-13 08:40:46 -03:00
Piotr Mienkowski 8a474ff082 docs: zephyr: add "Installing Requirements and Dependencies"
This patch documents requirements and dependencies necessary to build
mcuboot on Zephyr.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-08-08 07:02:50 -03:00
Fabio Utzig 6f9c79526a Remove hal_flash_align from porting requirements
`bootutil` was updated to use exclusively `flash_area_align` removing the
dependency on this single `hal_flash` function.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2018-08-07 09:58:00 -03:00
Mark Schulte b88b2c4544 docs: (imgtool) explain --pad-header + hex file
Add an explanation for what happens when using the "--pad-header" flag
with a hex file.

Signed-off-by: Mark Schulte <mschulte@lyft.com>
2018-07-17 12:04:17 -03:00
Fabio Utzig 3c93901a71 Update with 1.2.0 release notes
Signed-off-by: Fabio Utzig <utzig@apache.org>
2018-06-26 13:15:48 -03:00