arm-trusted-firmware/drivers/auth
Manish V Badarkhe a2a5a94569 fix(driver/auth): avoid NV counter upgrade without certificate validation
Platform NV counter get updated (if cert NV counter > plat NV counter)
before authenticating the certificate if the platform specifies NV
counter method before signature authentication in its CoT, and this
provides an opportunity for a tempered certificate to upgrade the
platform NV counter. This is theoretical issue, as in practice none
of the standard CoT (TBBR, dualroot) or upstream platforms ones (NXP)
exercised this issue.

To fix this issue, modified the auth_nvctr method to do only NV
counter check, and flags if the NV counter upgrade is needed or not.
Then ensured that the platform NV counter gets upgraded with the NV
counter value from the certificate only after that certificate gets
authenticated.

This change is verified manually by modifying the CoT that specifies
certificate with:
1. NV counter authentication before signature authentication
   method
2. NV counter authentication method only

Change-Id: I1ad17f1a911fb1035a1a60976cc26b2965b05166
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-04-27 14:16:59 +01:00
..
cryptocell cryptocell: add support for Cryptocell 713 2020-04-01 22:14:36 +03:00
dualroot dualroot: add chain of trust for Platform owned SPs 2020-08-12 14:30:31 +01:00
mbedtls Crypto library: Migrate support to MbedTLS v2.24.0 2020-10-01 11:12:18 +00:00
tbbr tbbr/dualroot: rename SP package certificate file 2020-07-31 12:46:21 +01:00
auth_mod.c fix(driver/auth): avoid NV counter upgrade without certificate validation 2021-04-27 14:16:59 +01:00
crypto_mod.c drivers: crypto: Add authenticated decryption framework 2020-03-06 16:40:37 +05:30
img_parser_mod.c Coverity: remove unnecessary header file includes 2020-02-04 10:23:51 -06:00