forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto API: make sure TEE_Attribute parameters are readable
Fixes OP-TEE#161. Services that take a TEE_Attribute array for input must check that the memory is readable before using it. This is accomplished by check_attr_read_access(), which is either called directly by the system service or by tee_svc_cryp_check_attr(). Buffers pointed to by 'reference' attributes are also validated. Then, it is no longer necessary to check accessibility in other functions such as tee_svc_cryp_obj_store_attr_raw(). Signed-off-by: Jerome Forissier <[email protected]>
- Loading branch information
1 parent
e2d57f4
commit fb19c84
Showing
1 changed file
with
73 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb19c84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an improvement, but when we're running TEE Core in SRAM and TAs in DRAM there's a window where the pointers in the attribute list can be attacked (provided that it's possible to change content in TrustZone protected DRAM in an attack).
Since this patch any way improves the situation I recommend that we take it and later fix the remaining problem.