Commit Graph

27 Commits (a8c8c19fe8ddbf160bb441c4350728b7ea71760c)

Author SHA1 Message Date
Daniele Lacamera 77fe733e7f F-7391: library hal: reject undersized files, bound hash to loaded size
main() loaded a file of any size and parsed it as a manifest: header
fields (size, TLVs) were read past the end of the heap allocation, and
a header claiming a larger fw_size drove the image hash over an
unbounded range. Reject files smaller than IMAGE_HEADER_SIZE before
parsing and clamp fw_size to the bytes actually loaded.
2026-09-04 10:24:11 +02:00
Daniele Lacamera 2e918de239 F-9749: propagate the verify result from wolfBoot_start to the exit code
wolfBoot_start() in hal/library.c ended its exit: path with an
unconditional 'return 0;', so a rejected image (bad header, hash or
signature) still made the test-lib process exit 0. main() propagates
wolfBoot_start()'s return value, so the failure was only visible in
the printed "Failure" message, which the test-library workflow had to
grep for (TODO referencing PR #625).

Return ret, which carries the wolfBoot_verify_*() error on every path
that reaches exit: with a failure. The success path never returns:
do_boot() jumps to the firmware.

The test-library workflow drops the status-rewriting workaround and
asserts the non-zero exit code directly, keeping the "Failure"
message check as a diagnostic.

Verification:
- Built: make test-lib (host, library.config, ED25519/SHA256).
- Tested: local repro of the workflow flow: corrupt the last byte of
  a signed image; before the fix the process exited 0 while printing
  "Failure -1", after the fix it exits 255; a valid image still
  exits 0 with "Firmware Valid".
- Pitfalls: 'return ret' only changes the error paths; do_boot() does
  not return on success.
- Style: the cstyle-check.sh FMT flag on hal/library.c is present on
  the pre-change file as well (not introduced here).
- Message: F-9749: prefix, no co-author trailers.
2026-08-25 08:50:43 +02:00
Daniele Lacamera 47f58ad2f1 Moving trustzone test to, wolfboot-ci-m33mu CI to v1.0 2026-03-24 14:25:18 +01:00
Daniele Lacamera 87c1cb3709 Bump CI v0.9.5 2026-03-24 13:56:36 +01:00
Daniele Lacamera 1a5683cf70 Bump CI v0.9.4 2026-03-24 13:35:01 +01:00
Daniele Lacamera 81c6cf6326 Bump CI -> v0.9.3 2026-03-24 13:10:38 +01:00
Daniele Lacamera 42cbe1fbbf Bump ci v0.9.2 2026-03-24 12:57:59 +01:00
Daniele Lacamera 6b7448d4d1 CI version: up to 'latest' 2026-03-24 12:40:46 +01:00
Daniele Lacamera 977ba182fb Refactoring CI workflows to run in containers (part 1) 2026-03-24 11:30:57 +01:00
Daniele Lacamera ced551797f Fix xmalloc bucket size issue with "SPMATH=1 WOLFBOOT_SMALL_STACK=1"
+ Re-enabled old faulty tests

F/366
2026-03-12 09:28:51 +01:00
gojimmypi eaf029fbc5
CMake Improvements 2025-11-18 17:44:43 -08:00
gojimmypi e06076fdde Exclude some known failures SPMATH WOLFBOOT_SMALL_STACK 2025-10-22 16:07:14 +02:00
gojimmypi ba86c255d3 Different stack detection message 2025-10-22 16:07:14 +02:00
gojimmypi a0c75b092d Retry with WOLFBOOT_HUGE_STACK=1 as needed 2025-10-22 16:07:14 +02:00
gojimmypi 3d49027c87 Remove concurrency 2025-10-22 16:07:14 +02:00
gojimmypi 7978a53c21 Expand concurrency definition 2025-10-22 16:07:14 +02:00
gojimmypi 38a7664918 Do not cancel in-progress group 2025-10-22 16:07:14 +02:00
gojimmypi 04052599b8 Set max-parallel 12 to address runner concurrency saturation, cleanup 2025-10-22 16:07:14 +02:00
gojimmypi 691e063e2d
Reduce timeout from default 360 minutes to 15 2025-10-06 13:16:26 -07:00
David Garske 271ae4c2f0 Improving matrix. 2025-04-29 11:50:29 +02:00
David Garske cc63bf92ab Fix error "Cannot use SMALL_STACK=1 with HUGE_STACK=1" 2025-04-29 11:50:29 +02:00
David Garske b6179a2780 Fixing test-lib matrix. 2025-04-29 11:50:29 +02:00
David Garske 312d955125 Add small stack. Fix to use sim for test-lib. 2025-04-29 11:50:29 +02:00
David Garske 6f8cf9cb4c Add matrix for all math and sign/hash types. 2025-04-29 11:50:29 +02:00
David Garske 3a2ac0b7a8 Troubleshooting test-lib failure. 2025-04-29 11:50:29 +02:00
David Garske 6f3722d31a Fix test-lib expected failure case. 2025-04-29 11:50:29 +02:00
David Garske adc003351b Support for building libwolfboot.a. Library target used to just build a test-lib, but that's not very portable. Added test cases. 2025-04-29 11:50:29 +02:00