summaryrefslogtreecommitdiff
path: root/core/lib/libtomcrypt/sm2-pke.c
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2020-11-13 15:34:08 +0100
committerJérôme Forissier <jerome@forissier.org>2020-11-19 09:48:33 +0100
commita8fb1651777edc48702e166c7a8c5827b92c4a8e (patch)
tree838c42e890e6ee2d64b8ec4f80e3c257bb8c6634 /core/lib/libtomcrypt/sm2-pke.c
parent9f543cd3f8c72fe38d157f808e6b0d2a329cf37e (diff)
core: fix RPMB rollback vulnerability
Normal world is used to pass the RPMB request to the eMMC. If normal world saves a write request and returns an error instead it can be used at a later stage where OP-TEE doesn't expect a certain block to be updated. For more details on possible attacks and mitigations see [1] and [2]. The mitigation consists of two parts, while initializing and later how each write request is handled. While initializing the RPMB file system we don't have a spare dummy block so the alternative method of reading a block and writing it again is used instead. For normal write request all errors after the request message has been created will be retried 10 times. If a write request fails after 10 retries RPMB is disabled entirely until next boot. An eventual requesting TA is with an unexpected error code since we can't tell if the request has been committed to storage or not. Link: [1] https://www.westerndigital.com/support/productsecurity/wdc-20008-replay-attack-vulnerabilities-rpmb-protocol-applications Link: [2] https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/western-digital/collateral/white-paper/white-paper-replay-protected-memory-block-protocol-vulernabilities.pdf Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/lib/libtomcrypt/sm2-pke.c')
0 files changed, 0 insertions, 0 deletions