mcuboot/boot/zephyr
Michael Grand 5047f032c9 fih: Hardening of fault injection countermeasures
Returned values are now hardcoded. Indeed, while it is not
strictly needed (few return values different from SUCCESS
or FAILURE) complexity added by encoding return values might
cause the software to be vulnerable to fault attacks.

Return type changed from fih_int to fih_ret to make
the whole thing much simpler and therefore more robust
to fault attacks. In addition, its easier to predict
compiler behavior.

Affectation of sentive variables has been hardened using macro
FIH_SET (affectation + check wether write access has been properly
done). FIH_DECLARE() is added to ease the declaration of sentive
variables.

Equality tests fih_eq() and fih_not_eq() are now macros because
inlining produce more complex code (and weaker) than macros.
In addition fih_not_eq is modified to be the negation of fih_eq
which was not the case until now.

when FIH_NOT_EQ is used , FIH_SET(fih_rc, FIH_FAILURE) has been added
in some part of the code.

variable image_mask (bootutil_priv.h) is now volatile because a
double IF test is made on it.

some others parts of the code have been hardenned (eg. loop on images)

Signed-off-by: Michael Grand <m.grand@trustngo.tech>
2023-01-30 09:34:34 -07:00
..
boards boot: zephyr: boards: nrf52840dk: Fix overlay 2022-12-20 15:25:07 +01:00
include fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
targets zephyr: Remove outdated workaround for Kinetis 2019-12-02 11:56:24 -07:00
CMakeLists.txt zephyr: fix handling of devicetree overlays in mcuboot 2022-11-24 08:55:20 +01:00
Kconfig boot: zephyr: prefer swap move if scratch_partition not enabled 2022-11-14 14:38:41 +01:00
Kconfig.serial_recovery boot: zephyr: allow timeout based recovery with CDC ACM 2023-01-16 10:37:16 +01:00
app.overlay zephyr: fix handling of devicetree overlays in mcuboot 2022-11-24 08:55:20 +01:00
arm_cleanup.c zephyr: migrate includes to <zephyr/...> 2022-06-16 21:47:43 +02:00
boot_serial_extensions.c zephyr/boot_serial_extension: Switch to using FIXED_PARTITION_ 2022-09-08 12:44:58 +02:00
flash_map_extended.c boot: zephyr: fix xtensa define condition 2022-09-09 11:16:15 +02:00
flash_map_legacy.c bootutil: Refactor MCUBOOT_LOG_MODULE_(DECLARE|REGISTER) macros 2021-07-21 11:47:58 +02:00
hooks_sample.c fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
keys.c Add support for signed images in single loader mode 2022-01-13 14:05:30 -07:00
main.c fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
nrf52840dk_nrf52840_cc310_ecdsa.conf bootutil: ecdsa: Fix CC310 for nRF devices 2020-10-28 15:50:46 +01:00
os.c zephyr: use <zephyr/kernel.h> 2022-06-16 21:47:43 +02:00
prj.conf zephyr: removed CONFIG_SYSTEM_CLOCK_DISABLE=y 2021-12-15 16:23:51 +01:00
ram_load.conf zephyr: Wrapped the RAM loading mode in Zephyr configs. 2022-05-31 10:20:19 -06:00
sample.yaml zephyr: fix handling of devicetree overlays in mcuboot 2022-11-24 08:55:20 +01:00
serial_adapter.c zephyr: use <zephyr/kernel.h> 2022-06-16 21:47:43 +02:00
serial_recovery.conf zephyr: add zephyr's sanitycheck description 2019-12-16 18:40:34 +01:00
single_loader.c fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
single_slot.conf boot/zephyr: Added single-slot Zephyr-RTOS test build 2020-09-16 12:09:43 +02:00
usb_cdc_acm.overlay zephyr: Remove devicetree 'label' property 2022-08-12 11:18:24 +02:00
usb_cdc_acm_log_recovery.conf zephyr: allow recovery over usb cdc-acm with logs enabled 2020-02-27 10:01:25 +01:00