Commit Graph

3261 Commits (ef03cf007f26cb3fa19786de1e095d8ca65fc1dd)

Author SHA1 Message Date
Mattia Moffa ef03cf007f Fix additional findings
- Check diag_erase() return value in wolfBoot_record_failure()
- Dedicated WOLFBOOT_FAILURE_PHASE_SELF_UPDATE
- Mark the diagnostics flash write buffers XALIGNED_STACK(4) for HALs
  that access the source word by word
- Ensure diagnostics, update, or swap partitions don't overlap the
  bootloader
2026-07-02 17:53:12 +02:00
Mattia Moffa 1da9866630 Diagnostics: record additional events
- Failed boot after emergency update (WOLFBOOT_FAILURE_PHASE_RECOVERY)
- Failed verification of self-update image
2026-07-02 17:53:12 +02:00
Mattia Moffa 67f8ed1194 Diagnostics: support hal_flash_write/erase that return size 2026-07-02 17:53:12 +02:00
Mattia Moffa 55295b705c Diagnostics: move to next sector when last record is broken 2026-07-02 17:53:12 +02:00
Mattia Moffa 00e228d8d7 Check diagnostics partition is aligned and doesn't overlap
Also updates docs to specify the requirement of the HAL flash driver by
wolfBoot_clear_failures().
2026-07-02 17:53:12 +02:00
Mattia Moffa ceaed58782 Allow configuration of diagnostics record size on flash 2026-07-02 17:53:12 +02:00
Mattia Moffa 69e8e044c9 Add unit tests 2026-07-02 17:53:12 +02:00
Mattia Moffa 539852e8ac Address Copilot comments 2026-07-02 17:53:12 +02:00
Mattia Moffa 7cc4990907 Add option to persist boot/update failure info to flash
When boot/update partition verification fails during boot or update,
with this option the event is logged to flash in an ad-hoc partition.
Information about logged failures is made available to the application
through an API.
2026-07-02 17:53:12 +02:00
Marco Oliverio 466c481ba3 fdt: break loop compatibles when no NUL-terminator is found 2026-07-02 09:23:18 +02:00
Sameeh Jubran 2ef247a31e fix: capture real build config in sbom target and harden recipe
The sbom target fed `cc -dM -E` an empty /dev/null with only
WOLFSSL_USER_SETTINGS, so gen-sbom's build properties collapsed to host
compiler builtins (all filtered out as noise) and the SBOM did not reflect
the selected configuration. Harvest the actual -D config macros from CFLAGS
(filtered in the shell so defines whose values contain spaces, e.g.
BOOTLOADER_PARTITION_SIZE=$((...)), survive intact) so the SBOM captures the
real TARGET/SIGN/HASH/feature set.

Also:
- add preflight checks for empty WOLFBOOT_VERSION and missing GEN_SBOM
- pass sources via --srcs-file to avoid ARG_MAX on large configs
- include .S sources in the source set, not just .c
- make HOSTCC and GEN_SBOM overridable
- README: soften "CRA Compliance" wording, use wolfboot-<version>.* names,
  fix dangling wolfssl/doc/CRA.md link to point at the wolfSSL CRA Kit

Signed-off-by: Sameeh Jubran <sameeh.j@gmail.com>
2026-07-02 08:48:39 +02:00
Mark Atwood 5c75c51f46 docs: add SBOM/EU CRA Compliance section to README 2026-07-02 08:48:39 +02:00
Mark Atwood f0b28d2df5 feat: add sbom Makefile target
Adds sbom target that produces CycloneDX and SPDX
SBOM files for a specific TARGET+SIGN combination.
Sources extracted from OBJS variable via wildcard.
wolfcrypt sources compiled into wolfBoot are listed
as wolfBoot's own sources (not a separate component).
Requires GEN_SBOM or WOLFBOOT_LIB_WOLFSSL set.
2026-07-02 08:48:39 +02:00
Alex Lanzano 76b023008b Add DEBUG_UART build test for stm32wba. Fix stm32wba clock init 2026-07-02 08:44:45 +02:00
Alex Lanzano 337dabf2f2 Implement port for STM32WBA. Bump wolfHAL lib to latest 2026-07-02 08:44:45 +02:00
David Garske 221f2db787
Merge pull request #812 from danielinux/improve-armored-digest
armored: harden image integrity check against fault injections
2026-07-01 15:01:31 -07:00
Daniele Lacamera b0b36360ff test: bump SIGN=NONE footprint limit 2026-07-01 20:42:27 +02:00
Daniele Lacamera ed695bb0a2 armored: reset integrity state and extend sanity check 2026-07-01 20:28:58 +02:00
Daniele Lacamera 93f068b930 armored: harden image integrity check against fault injections 2026-07-01 19:48:02 +02:00
Aidan Garske 412face911
Merge pull request #811 from padelsbach/fix-wolfhsm-nightly
Add WOLFBOOT_TZ_TEST_BKPT=1 to fix wolfHSM nightly test
2026-06-30 16:34:12 -07:00
Paul Adelsbach 6558511ccb Add WOLFBOOT_TZ_TEST_BKPT=1 to fix wolfHSM nightly test 2026-06-30 13:37:37 -07:00
David Garske 1ad650b5be
Merge pull request #808 from rizlik/image_auth_int_fix
image: check integrity in wolfBoot_verify_authenticity()
2026-06-29 14:00:56 -07:00
Marco Oliverio ab80578d59 image: check integrity in wolfBoot_verify_authenticity() 2026-06-25 17:35:18 +02:00
David Garske 880c0a778e
Merge pull request #769 from aidangarske/h5-wolfhsm-port
Add WOLFCRYPT_TZ_WOLFHSM TrustZone engine for STM32H5
2026-06-24 19:15:55 -07:00
aidan garske b9bd6dae17 Add WOLFCRYPT_TZ_WOLFHSM TrustZone engine for STM32H5 2026-06-24 15:49:43 -07:00
David Garske b044c894fd
Merge pull request #806 from rizlik/oob_update_disk
update_disk.c: enforce bound over memcpy
2026-06-24 15:16:41 -07:00
Marco Oliverio 6e117a5b50 update_disk.c: enforce bound over memcpy 2026-06-23 17:28:25 +02:00
David Garske dd4fc26df8
Merge pull request #803 from rizlik/tpm_mfg_auth_value
IDevID: allow using pre-computed auth values
2026-06-22 08:49:25 -07:00
David Garske 7a76369acb
Merge pull request #798 from bigbrett/wolfhsm-no-keystore
Wolfhsm no keystore
2026-06-18 09:31:11 -07:00
David Garske 08c8bddc0d
Merge pull request #802 from rizlik/fix_oob_ramboot
fix: bound unauthenticated image size before RAM load
2026-06-18 08:01:55 -07:00
Marco Oliverio 4a1fc49aa6 test/ram-enc: add exact-max and one-block-over boundary tests 2026-06-18 11:26:15 +02:00
Marco Oliverio 6017dc5f2f ram_decrypt: assert RAM load region is block-aligned 2026-06-18 11:26:15 +02:00
Marco Oliverio e454c082fe ramboot: prefer RAMBOOT_MAX_SIZE bound over partition size 2026-06-18 11:26:15 +02:00
Marco Oliverio 0438c54c9b tpm: rename masterPassword param to authOverride 2026-06-18 11:06:18 +02:00
Marco Oliverio 723fffebc8 tpm: build MFG identity configs in CI 2026-06-18 11:06:18 +02:00
Marco Oliverio 68c797db72 tpm: dedupe precomputed authValue handle copy 2026-06-18 11:06:18 +02:00
Marco Oliverio f9cad20f5b tpm: zeroize EH master secret after derive 2026-06-18 10:45:40 +02:00
Marco Oliverio cb56e866b6 tpm: remove trailing whitespace in MFG identity docs 2026-06-18 10:45:13 +02:00
Marco Oliverio 8518eabc23 tpm: fix wolfBoot_tpm2_get_aik typo in header comment 2026-06-18 10:45:02 +02:00
Marco Oliverio 0649e5de99 ramboot: match #error text to the bounds-check guard 2026-06-18 10:22:55 +02:00
Marco Oliverio 4d1c961ae2 ram_decrypt: read header length endian-safe and aligned 2026-06-18 10:22:32 +02:00
Brett Nicholas 5b9a23b8ea rename no keystore macro 2026-06-17 17:46:11 -06:00
Brett Nicholas 3943c688f6 review: remove dangling references to WOLFHSM_CLIENT_LOCAL_KEYS from configs, add no keystore option default to config.mk 2026-06-17 17:37:34 -06:00
Brett Nicholas 11394b385c add fail-fast error for server cert chain auth, fenrir fix 2026-06-17 14:38:42 -06:00
Brett Nicholas 98d513f402 fenrir fixes for ml-dsa wolfHSM operations 2026-06-17 11:16:13 -06:00
Marco Oliverio dd4387e62d config: example: stm32h5 tpm IDevId example 2026-06-17 15:46:34 +02:00
Marco Oliverio 801ae8f1ca tpm: DevId identity allow to use precomputed auth values
Allow to either use a master different that the sample one or to
directly use the pre-computed per-device auth values for EH and AIK.
Using the per-device value is preferred as it doesn't expose the auth
value of the sibling devices in the same fleet.
2026-06-17 15:46:34 +02:00
Marco Oliverio 9449dfa7fe fix: bound unauthenticated image size before RAM load 2026-06-17 15:30:35 +02:00
Brett Nicholas 9582aeeb45 fix missing sign operation for no-keystore mode 2026-06-16 22:03:28 -06:00
Brett Nicholas b52dd5a1d0 make wolfHSM client ID parameterizable and settable via Makefiles 2026-06-16 22:03:28 -06:00