wolfBoot/tools
Daniele Lacamera f193b9c239 F-4789: fix uint64_t overflow in squashelf range filter segment end
In the PT_LOAD range filter, segmentEnd was computed as
p_paddr + p_memsz - 1 in uint64_t with no overflow check. Both fields
come straight from the (possibly crafted) ELF64 program header. When
p_paddr + p_memsz exceeds 2^64 the result wraps below p_paddr: the
wrapped end can land back inside the requested range, so a segment whose
true span lies entirely outside the range is spuriously included (and the
converse can silently drop a valid segment). squashelf would then emit a
squashed image that wolfBoot signs and boots.

Detect the overflow before computing segmentEnd and treat such a segment
as out-of-range. ELF32 cannot overflow a uint64 sum and is unaffected.

Adds tools/squashelf/test-range-overflow.py (run via `make test`) which
fails before the fix and passes after.
2026-06-09 15:52:07 +02:00
..
bin-assemble Fix warnings with _MSC_VER and _MSC_VER 2025-10-22 16:04:39 +02:00
check_config Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
delta Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
efi Removed all compile-time dependency from keytools 2024-11-26 13:17:00 +01:00
elf-parser Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
fdt-parser Add wolfBoot FIT support for loading bitstream 2026-06-09 15:30:27 +02:00
keytools F-5131: fix stale delta inverse-patch offset when cert chain expands header 2026-06-09 15:52:07 +02:00
lms Addressed copilot's comments 2026-04-29 13:15:52 +02:00
renode Addressed copilot's comments 2026-04-28 15:22:41 +02:00
scripts Add wolfBoot port for STM32N6 (NUCLEO-N657X0-Q) 2026-05-28 16:49:57 +02:00
squashelf F-4789: fix uint64_t overflow in squashelf range filter segment end 2026-06-09 15:52:07 +02:00
test-expect-version Fix NRF52 UART DMA and Renode test infrastructure 2026-04-28 15:04:35 +02:00
test-update-server Cosmetic fix test-update-server 2026-01-15 21:59:58 +01:00
tpm F-4973: clamp TPM-supplied nvPublic.dataSize before NV read-back in rot.c 2026-06-09 15:52:07 +02:00
uart-flash-server Preparing release v2.8.0 + update copyright 2026-04-16 13:11:56 +02:00
unit-tests F-4790: clamp OTP pubkey_size in keystore_get_size to prevent OOB read 2026-06-09 15:52:07 +02:00
xmss Zeroize XMSS key readback buffer 2026-04-29 12:31:21 +02:00
config.mk Add wolfBoot port for STM32N6 (NUCLEO-N657X0-Q) 2026-05-28 16:49:57 +02:00
test-delta.mk Remove dependency from PQC parameters. Speed up tests. 2024-12-02 18:55:32 +01:00
test-enc.mk Removed all compile-time dependency from keytools 2024-11-26 13:17:00 +01:00
test-renode.mk review: add additional RSA PSS test and bench coverage 2026-04-28 15:02:57 +02:00
test.mk Update wolfssl submodule to latest master 2026-05-18 23:02:54 -07:00
wolfboot-rpi-devicetree.diff