diff options
author | Khoa Hoang <admin@khoahoang.com> | 2020-02-21 16:41:01 -0800 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2020-02-25 09:50:49 +0100 |
commit | a37709764fe25644a21a0e29330394c6954f310b (patch) | |
tree | 22a047e0af64121dd9df49362f5d82a749f4da0b | |
parent | 86fef8ae43d635f0eb5489e1d9c2bc4b31525d91 (diff) |
core: ree_fs_ta: fix bootstrap header size check
This change fix bootstrap header size check. Before it use
sizeof(bs_hdr) but bs_hdr is a struct pointer. Correct it
to sizeof(*bs_hdr)
Fixes: 183398139c9c ("core: enable rollback protection for REE-FS TAs")
Signed-off-by: Khoa Hoang <admin@khoahoang.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r-- | core/arch/arm/kernel/ree_fs_ta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/arch/arm/kernel/ree_fs_ta.c b/core/arch/arm/kernel/ree_fs_ta.c index e4262208..4be784a0 100644 --- a/core/arch/arm/kernel/ree_fs_ta.c +++ b/core/arch/arm/kernel/ree_fs_ta.c @@ -184,7 +184,7 @@ static TEE_Result ree_fs_ta_open(const TEE_UUID *uuid, shdr->img_type == SHDR_ENCRYPTED_TA) { TEE_UUID bs_uuid; - if (ta_size < SHDR_GET_SIZE(shdr) + sizeof(bs_hdr)) { + if (ta_size < SHDR_GET_SIZE(shdr) + sizeof(*bs_hdr)) { res = TEE_ERROR_SECURITY; goto error_free_hash; } |