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

Did not check malloc result #2

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

Did not check malloc result #2

jmp0x7c00 opened this issue Jan 6, 2023 · 0 comments

Comments

@jmp0x7c00
Copy link

message may be NULL:

message = (unsigned char *)malloc(strlen(choosen_message));

We can infer that message holds sensitive information because it will be encrypted:

sgx_status_t ret_get_output_len = sgx_rsa_pub_encrypt_sha256(

So choosen_message is sensitive too beacuse its content will be copied into message

std::copy(choosen_message, choosen_message + strlen(choosen_message), message);

if message is NULL, choosen_message will be copied outside enclave, which results in privacy leakage.

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