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] Without verifying whether malloc is successful, copy the enclave buf outside directly #72

Open
jmp0x7c00 opened this issue Jan 7, 2023 · 0 comments

Comments

@jmp0x7c00
Copy link

same to #70

*resp = reinterpret_cast<char *>(malloc(len + 1));

*resp may be NULL

here is a memory copy, the content of query1 can be leaked outside enclave.

memcpy(*resp, query1, len);


same issue:

s = (char *) realloc(s, s_len + n1 + n2 + n3 + 1);

memcpy(s + s_len, buf, n1);

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

No branches or pull requests

1 participant