Commit Graph

10 Commits

Author SHA1 Message Date
Tamas Ban 4a34b0fed1 ci: Update TF-M version to be aligned with FIH library changes
So far the FIH CI job was fetching a WIP change from
TF-M Gerrit to align the MCUboot and TF-M from the FIH
library point of view. This change is replacing to fetch
the final version instead of the WIP change.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
2023-02-22 08:14:09 -07:00
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
Tamas Ban 166075ef4b ci: fih: update TF-M version to 1.7.0 and adjust test suite
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I1a810bac6e0409ff06af80c8151b8d37a97effdc
2022-12-16 13:06:11 +01:00
Fabio Utzig 7aa1c87dd8 ci: add FIH hardening tests to workflows
Add workflows to run FIH tests using GH actions. Update scripts to add
parsing of FIH parameters from a env matrix and disable docker caching
when running on GH.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-27 14:23:19 -03:00
Sherry Zhang 3c4f69cb6e ci: Update the TF-M version in fih test
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: I357ca9266629310deddf8431aa912f3fdbe9f34c
2021-09-22 12:41:20 +02:00
Raef Coles 713bb79549 ci: Update TF-M version
To fix a regression caused by f68473814f,
where an older TF-M version was used that didn't support the bootutil
cmake.

Signed-off-by: Raef Coles <raef.coles@arm.com>
2021-01-15 11:11:42 +01:00
Fabio Utzig 6907c90e31 ci: pull trusted-firmware-m repo on Travis run
Update volume maps so local directories in the Travis VM map correctly
to the Docker expected PATH for script running. Misc cleanups.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2021-01-06 14:13:44 -03:00
Mate Toth-Pal 0eead8c263 travis: Add FIH test cases to .travis.yml
Change-Id: I7ce96821e4af645a8d20696d02d8a09d9822b9f7
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
2020-11-12 09:27:10 +01:00
Mate Toth-Pal 6298067d02 travis: Add FIH test scripts
Add scripts that can run instruction skip FIH tests on QEMU.

Co-authored-by: Raef Coles <raef.coles@arm.com>
Change-Id: Ia6da00174115e1dabaf84fdfc0e40476dc1b7a10
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
2020-11-12 09:27:10 +01:00
Mate Toth-Pal 5495f20355 travis: Build MCUBoot for Armv8-M
Build MCUBoot with TF-M build system for AN521 platform, and run it in
QEMU. The result of the test run is not evaluated yet.

Change-Id: I5fbfef8e6d8dec99a8e3e00d659a07ccfcaf0b5b
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
2020-11-12 09:27:10 +01:00