Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security: Memory Leak in the function TEE_PopulateTransientObject #71

Closed
c01dkit opened this issue Aug 1, 2022 · 1 comment · Fixed by #89
Closed

Security: Memory Leak in the function TEE_PopulateTransientObject #71

c01dkit opened this issue Aug 1, 2022 · 1 comment · Fixed by #89
Assignees

Comments

@c01dkit
Copy link

c01dkit commented Aug 1, 2022

Affected components:

affected source code file: /tee/lib/libutee/tee_api_objects.c, affected functions: TEE_PopulateTransientObject and __utee_from_attr

Attack vector(s)

To exploit the vulnerability, invoke the function TEE_PopulateTransientObject and pass a large number of the parameter "attrCount"

Suggested description of the vulnerability for use in the CVE

Memory leak in TEE_PopulateTransientObject and __utee_from_attr functions in Samsung Electronics mTower v0.3.0(and earlier) allows a trusted application to trigger denial of service and information disclosure via invoking the function TEE_PopulateTransientObject with a large number of the parameter "attrCount".

Reference(s)

https://github.com/Samsung/mTower

TEE_Result TEE_PopulateTransientObject(TEE_ObjectHandle object,

Additional information

The TEE_PopulateTransientObject function takes a number "attrCount" and create an array "ua". This value is passed by TA, and TEE_PopulateTransientObject does not check its size. Then it is passed to __utee_from_attr. The __utee_from_attr function tries to copy data from "attrs" to "ua". The problem appears in the assignments in the for loop. If the attr_count is too large, "ua" will overlap the memory region of other TAs' (tampering data such as global variables, or causing TEE crash and triggers denial of service because of illegal address dereference).

Contact

c01dkit@outlook.com

@tdrozdovsky tdrozdovsky self-assigned this Sep 4, 2022
@tdrozdovsky
Copy link
Contributor

The issue will be reviewed and fixed as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants