mcuboot/boot/mynewt
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
..
boot_uart boot_uart: mynewt; option for faster speed with serial. 2018-12-24 08:47:25 -02:00
flash_map_backend mynewt: add flash sector requirement for swap move 2023-01-06 17:41:03 -03:00
mcuboot_config Add downgrade prevention for swaps 2022-10-04 08:52:57 -06:00
src fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
README.md doc: Fixed consistency of bootloader term 2021-10-21 06:45:13 -03:00
pkg.yml mynewt: Make cflags consistent for if or ifdef usage 2019-10-21 17:22:34 -03:00
syscfg.yml mynewt: Allow custom boot to be provided by pkg 2022-06-13 19:57:09 -03:00

README.md

MCUboot - apps/boot

This sample app implements a bootloader for the Mynewt OS (apache.mynewt.org). This app requires the following Mynewt repositories: * @mcuboot (this one) * @apache-mynewt-core