Commit Graph

249 Commits (c8faa5adc222c37b07e45e2a18f03890dad19848)

Author SHA1 Message Date
David Garske c8faa5adc2 Authenticate raw device tree via signed HDR_DEVICE_TREE_DIGEST TLV (Fenrir #7998) 2026-08-13 08:39:22 +02:00
Josh Holtrop 45ff674a87 Build coding.o unconditionally with asn.o 2026-08-13 07:46:42 +02:00
Daniele Lacamera db8e768bbc aarch64: link the ARM ChaCha port when ChaCha is selected
Under WOLFSSL_ARMASM, chacha.c calls wc_chacha_crypt_bytes(), which
arch.mk never adds for AArch64 -- it only pulls in the aes/sha ports.
Any AArch64 build using ChaCha failed to link. Add the object in
options.mk, where ChaCha is selected.

Also add a ChaCha variant of the zynqmp_sdcard ENCRYPT build to CI.
2026-08-11 13:59:06 +02:00
David Garske f505f88bd3
Merge pull request #847 from bigbrett/wolfhsm-expose-max-verify-roots
wolfHSM: expose max verify roots in options.mk
2026-08-10 12:57:19 -07:00
David Garske 811c9d049a aarch64_efi: measure kernel into firmware TPM via EFI_TCG2 2026-08-10 21:03:50 +02:00
Brett Nicholas 64e6a3aeb0 wolfHSM: expose max verify roots in options.mk 2026-08-06 11:27:33 -06:00
Aidan Garske db0801b9b4 Add wolfCOSE DICE attestation 2026-08-06 09:44:52 +02:00
David Garske 5f40400e57 PolarFire SoC: address PR review
- wolfBoot_fit_memcpy: return int so a failed PDMA copy propagates instead
  of being swallowed. The weak default (memcpy) returns 0; the MPFS250 PDMA
  override returns -1 if any chunk's mpfs_pdma_memcpy() fails. Callers now
  fail closed: fit_load_image_inner returns NULL (kernel load then panics
  via update_disk.c), the update_disk DTS copy panics, and hal_dts_fixup
  returns an error on a failed L2->DDR copy-back.
- options.mk: gate -DSTACK_SIZE_PER_HART behind RISC-V arch (RISCV/RISCV64).
  The macro is only consumed by the RISC-V startup asm and the mpfs250-m.ld
  sed token, so it is no longer emitted for PPC/ARM/other targets. The
  unconditional default (?= 0) is kept because the linker sed always needs
  a value to substitute.
2026-08-03 12:27:22 +02:00
David Garske e718eed709 PolarFire SoC: LPDDR4 DDR init for MPFS250T Video Kit (M-Mode) 2026-08-03 12:27:22 +02:00
Mattia Moffa 6da07ffc3d Add support for ARM Compiler for Embedded on stm32u5 2026-07-31 16:00:14 +02:00
David Garske eaa39be9e4 renesas-rx: fix build for GCC RX 8.3/14.2 2026-07-30 15:32:31 +02:00
Aidan Garske 4ab9891830
Merge pull request #836 from bigbrett/wh-tz-fix-unconditional-sha512-enable
fix unconditional SHA512 opt-in for wolfHSM builds
2026-07-29 12:21:54 -07:00
Marco Oliverio 15c7e621ed wolfHSM client: target-independent build fixes and improvement
Four fixes needed by any wolfHSM client

- include/user_settings.h emitted "typedef struct WC_RNG WC_RNG;" whenever
  WOLF_CRYPTO_CB && WC_NO_RNG, with no __ASSEMBLER__ guard, so a client built
  with ARM thumb2 assembly failed to assemble wolfSSL's .S sources. Guard it.

- options.mk hardcoded WOLFHSM_CFG_COMM_DATA_LEN=5000 for every client. Make
  it a variable (default unchanged) so ports whose transport slot is smaller
  can override it.

- options.mk gated DEBUG_UART on the existence of the driver *object*, which
  never exists on a clean tree, so DEBUG_UART was dropped on the very build
  meant to enable it. Test for the source instead.

- Makefile unconditionally built an NVM key image with whnvmtool for
  WOLFHSM_CLIENT=1. Add WOLFHSM_NVM_IMAGE=0 for ports that install the
  verification key at boot instead.
2026-07-29 18:07:45 +02:00
Brett Nicholas fa53af0b49 remove unconditional SHA512 opt-in for wolfHSM server targets and scope to only TZ mode 2026-07-28 13:14:53 -06:00
Brett Nicholas 235bd820e6 Add support for auxillary algorithms and cert chain/TPM usage 2026-07-22 11:47:16 +02:00
aidan garske eb7f92770c 6562 - Emit build-time warning for WOLFBOOT_SKIP_BOOT_VERIFY 2026-07-14 17:44:26 +02:00
David Garske 277cbbe4f8
Merge pull request #814 from danielinux/fenrir-fixes-2026-07-02
Fenrir fixes 2026 07 02
2026-07-02 09:44:58 -07:00
Mattia Moffa ceaed58782 Allow configuration of diagnostics record size on flash 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
Daniele Lacamera eb5574f19e F-6124: emit build-time warning for SIGN=NONE / WOLFBOOT_NO_SIGN
SIGN=NONE disables firmware signature authenticity verification
entirely (wolfBoot_verify_authenticity() becomes a stub that always
confirms), leaving only a hash check an attacker can satisfy. Every
other fail-safe-weakening option in this file (ALLOW_DOWNGRADE,
DISABLE_BACKUP, WOLFBOOT_UDS_UID_FALLBACK_FORTEST, FPGA_NONFATAL)
emits a $(warning ...) so the tradeoff is visible at build time;
SIGN=NONE was missing one despite being the most security-critical.
2026-07-02 15:47:17 +02:00
Daniele Lacamera e09074a0c6 F-6401: emit build-time warning for FPGA_NONFATAL=1
FPGA_NONFATAL downgrades a failed PL bitstream load from fatal (panic)
to a logged non-fatal warning, letting boot continue without the
programmable logic. Every other fail-safe-weakening option in this
file (ALLOW_DOWNGRADE, DISABLE_BACKUP,
WOLFBOOT_UDS_UID_FALLBACK_FORTEST) emits a $(warning ...) so the
tradeoff is visible at build time; FPGA_NONFATAL was missing one.
2026-07-02 15:07:05 +02:00
aidan garske b9bd6dae17 Add WOLFCRYPT_TZ_WOLFHSM TrustZone engine for STM32H5 2026-06-24 15:49:43 -07: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
Brett Nicholas 11394b385c add fail-fast error for server cert chain auth, fenrir fix 2026-06-17 14:38:42 -06: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
Brett Nicholas b52dd5a1d0 make wolfHSM client ID parameterizable and settable via Makefiles 2026-06-16 22:03:28 -06:00
Brett Nicholas 7195bd8008 remove unnecessary wolfHSM PUBKEY_ID macro 2026-06-16 22:03:28 -06:00
Brett Nicholas e0e08a7dd2 add no keystore option 2026-06-16 22:03:28 -06:00
Daniele Lacamera e9b70fe861 F-3969: warn when WOLFBOOT_UDS_UID_FALLBACK_FORTEST=1 weakens UDS to public device UID
Add a $(warning ...) in options.mk matching the existing pattern used
for ALLOW_DOWNGRADE and DISABLE_BACKUP, so operators are alerted at
build time that UDS (and all derived DICE/PSA secrets) is being rooted
in the publicly-readable STM32 factory UID rather than OTP fuses.
2026-06-11 19:04:05 +02:00
Daniele Lacamera 889788d2b5 F-3968: emit build-time warning when ALLOW_DOWNGRADE=1 is set
Mirror the DISABLE_BACKUP treatment: print a $(warning ...) so the
build operator gets an unmistakable signal that anti-rollback
enforcement has been disabled.
2026-06-11 17:53:47 +02:00
Alex Lanzano 01c52d87e8 remove wolfhal TARGET. Add WOLFHAL option 2026-06-10 17:12:25 +02:00
Alex Lanzano 125872c571 Create STM32WB wolfHAL example. GC sections on all test apps 2026-06-10 17:12:25 +02:00
David Garske 14f6e4a298 Add wolfBoot FIT support for loading bitstream 2026-06-09 15:30:27 +02:00
Brett Nicholas a1f86fa1c2 expose root CA list as makefile var 2026-05-26 17:37:50 +02:00
Yosuke Shimizu f4d5340641 Add hardware-based DICE on mcxn 2026-05-21 20:49:20 +02:00
Tobias Frauenschläger 6e60abd034 Continue the ML-DSA renaming 2026-05-19 11:21:20 -07:00
Tobias Frauenschläger cab04ad789 Update wolfssl submodule to latest master
* file level rename for ML-DSA
* Add missing source file to build system
* Update some macros
* Other minor fixes
* Update size limitations for some slight increases
2026-05-18 23:02:54 -07:00
Brett Nicholas a2e9267529 Adds generic cryptocb support for PK, hash, and symmetric crypto 2026-05-05 16:37:54 +02:00
David Garske 85fb32b1dd Fixes from peer review. Thank you Alex 2026-05-05 10:16:16 +02:00
David Garske c643215c5e fit: gzip-compressed kernel + ramdisk (initramfs) support
Wires the new wolfBoot_gunzip inflater into the FIT image-loading path
and adds initramfs (ramdisk) extraction with DTB /chosen fixup so a
single signed FIT can carry kernel, DTB, and rootfs.

GZIP path
---------
* fit_load_image_ex(out_max) added; fit_load_image kept as a wrapper.
* When a subimage carries compression="gzip", inflate straight to the
  FIT-declared load address, then verify the FIT hash-1 subnode
  (sha256 / sha384 if available) for defense in depth on top of the
  outer wolfBoot signature. The compression property is now read
  unconditionally so a build without WOLFBOOT_GZIP can warn and fail
  closed instead of silently memcpy-ing compressed bytes as if they
  were raw.
* fit_verify_hash propagates wc_InitSha256 / wc_Sha256Update /
  wc_Sha256Final return codes (and the SHA-384 equivalents) - any
  non-zero return is treated as a verification failure so a misbehaving
  backend cannot silently degrade to a no-op.
* GZIP=1 is the new default in the FIT-using example configs (zynqmp,
  zynqmp_sdcard, polarfire_mpfs250, polarfire_mpfs250_qspi,
  versal_vmk180, versal_vmk180_sdcard); set GZIP=0 to opt out.

Ramdisk path
------------
* fit_find_images() gains a ramdisk out-arg and fdt_fixup_initrd()
  writes /chosen/linux,initrd-{start,end} as 64-bit big-endian cells.
* update_disk.c and update_ram.c load the FIT ramdisk node (under
  WOLFBOOT_FIT_RAMDISK) and patch the loaded DTB. Compressed (gzip)
  ramdisks reuse the same fit_load_image_ex() decompress path.
* RAMDISK=1 build switch defines WOLFBOOT_FIT_RAMDISK;
  WOLFBOOT_LOAD_RAMDISK_ADDRESS is plumbed through tools/config.mk ->
  Makefile sed -> include/target.h.in. Defaults to 0; when 0 the
  ramdisk stays at whatever fit_load_image returned.
* hal/zynq.c and hal/versal.c bump fdt_totalsize headroom from 512 to
  768 bytes to fit the new linux,initrd-{start,end} entries.
* config/examples/zynqmp_sdcard.config gains a commented-out opt-in
  block (RAMDISK=1, WOLFBOOT_LOAD_RAMDISK_ADDRESS=0x40000000, alt
  LINUX_BOOTARGS) so a single config file covers both rootfs-on-disk
  and FIT-bundled-initramfs flows.

Builds against the existing master configs are byte-identical when
GZIP=0 and RAMDISK is unset.
2026-05-05 10:16:16 +02:00
Brett Nicholas 65d84a29ec Add SW-only RSA PSS 2026-04-28 15:02:57 +02:00
Daniele Lacamera cffa75d4a4 Proper interface renaming + documentation 2026-04-22 14:14:28 +02:00
Daniele Lacamera 884352cf08 Updated object list to match latest wolfTPM 2026-04-22 12:17:51 +02:00
Daniele Lacamera b22c85ed27 Added support for fTPM in TrustZone + STM32H5 test app 2026-04-21 20:53:48 +02:00
Brett Nicholas c45268ed7f monolithic self-updates: force DISABLE_BACKUP=1, eliminate swap, eliminate update code 2026-04-17 08:27:05 +02:00
Brett Nicholas f7ea40f7cc Add oneshot hash build option 2026-04-17 08:25:51 +02:00
David Garske 58c2e044a6
Merge pull request #730 from danielinux/clang-linker
Fix embedded images built with the clang compiler
2026-04-13 10:55:19 -07:00
Mattia Moffa 6fda79923e Replace tabs with spaces in options.mk 2026-04-09 16:44:43 +02:00
Daniele Lacamera fab609df64 options: normalize self-update monolithic flag 2026-04-09 14:53:35 +02:00
Daniele Lacamera b705ca74ae Warn when DISABLE_BACKUP is enabled
F/2257
2026-04-08 19:53:50 +02:00